// Equal returns true if the given option is equal to the instance one. In case
// the given option is nil, we checked the instance one is set to the default
// value of the option.
488907
func (o *SortFacetValuesByOption) Equal(o2 *SortFacetValuesByOption) bool {
	if o2 == nil {
		return o.value == "count"
	}
	return o.value == o2.value
}
101427
func (null Null) Equal(other Value) bool {
	switch other.(type) {
	case Null:
		return true
	default:
		return false
	}
}
97001
func (o *HighlightPostTagOption) Equal(o2 *HighlightPostTagOption) bool {
	if o2 == nil {
		return o.value == "</em>"
	}
	return o.value == o2.value
}
245570
func Equal(a1, a2 interface{}) bool {
	if a1 == nil || a2 == nil {
		return a1 == a2
	}
	v1 := reflect.ValueOf(a1)
	v2 := reflect.ValueOf(a2)
	if v1.Type() != v2.Type() {
		return false
	}
	return deepValueEqual(v1, v2, make(map[visit]bool), 0)
}
59015
func (f Float) Equal(e Equaler) bool {
	ef := e.(Float)
	if f != f && ef != ef { // For our purposes NaN == NaN.
		return true
	}
	return f == ef
}
1036101
func (a *AggFuncDesc) Equal(ctx sessionctx.Context, other *AggFuncDesc) bool {
	if a.HasDistinct != other.HasDistinct {
		return false
	}
	return a.baseFuncDesc.equal(ctx, &other.baseFuncDesc)
}
466954
func (self IntEqualer) Equal(e Equaler) bool {
	return self.I == e.(IntEqualer).I
}
604508
func (o *UserTokenOption) Equal(o2 *UserTokenOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
419363
func (o *OptionalFiltersOption) Equal(o2 *OptionalFiltersOption) bool {
	return o.comp.Equal(&o2.comp)
}
523348
func (o *RestrictHighlightAndSnippetArraysOption) Equal(o2 *RestrictHighlightAndSnippetArraysOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
1040647
func Equal(x, y Value) (bool, error) {
	if x, ok := x.(String); ok {
		return x == y, nil // fast path for an important special case
	}
	return EqualDepth(x, y, maxdepth)
}
494811
func (o *MinWordSizefor2TyposOption) Equal(o2 *MinWordSizefor2TyposOption) bool {
	if o2 == nil {
		return o.value == 8
	}
	return o.value == o2.value
}
766486
func (o *TypoToleranceOption) Equal(o2 *TypoToleranceOption) bool {
	if o2 == nil {
		return o.value == typoToleranceTrue
	}
	return o.value == o2.value
}
917344
func (s *State) Equal(other *State) bool {
	// If one is nil, we do a direct check
	if s == nil || other == nil {
		return s == other
	}

	s.Lock()
	defer s.Unlock()
	return s.equal(other)
}
115469
func (o *AttributeForDistinctOption) Equal(o2 *AttributeForDistinctOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
715201
func (o *IndexNameOption) Equal(o2 *IndexNameOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
568354
func (o *FacetFiltersOption) Equal(o2 *FacetFiltersOption) bool {
	return o.comp.Equal(&o2.comp)
}