// 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.
766486
func (o *TypoToleranceOption) Equal(o2 *TypoToleranceOption) bool {
	if o2 == nil {
		return o.value == typoToleranceTrue
	}
	return o.value == o2.value
}
988151
func (o *NumericFiltersOption) Equal(o2 *NumericFiltersOption) bool {
	return o.comp.Equal(&o2.comp)
}
896971
func (o *ValidUntilOption) Equal(o2 *ValidUntilOption) bool {
	if o2 == nil {
		return o.value.IsZero()
	}
	return o.value.Equal(o2.value)
}
31507
func (o *QueryTypeOption) Equal(o2 *QueryTypeOption) bool {
	if o2 == nil {
		return o.value == "prefixLast"
	}
	return o.value == o2.value
}
1274687
func (o *PercentileComputationOption) Equal(o2 *PercentileComputationOption) bool {
	if o2 == nil {
		return o.value == true
	}
	return o.value == o2.value
}
690004
func (o *ClusterNameOption) Equal(o2 *ClusterNameOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
933636
func (o *HitsPerPageOption) Equal(o2 *HitsPerPageOption) bool {
	if o2 == nil {
		return o.value == 20
	}
	return o.value == o2.value
}
385221
func (o *RuleContextsOption) Equal(o2 *RuleContextsOption) bool {
	if o2 == nil {
		return reflect.DeepEqual(o.value, []string{})
	}
	return reflect.DeepEqual(o.value, o2.value)
}
461380
func (o *KeepDiacriticsOnCharactersOption) Equal(o2 *KeepDiacriticsOnCharactersOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
885476
func (i Int) Equal(other Argument) bool {
	if other.Typetag() != TypetagInt {
		return false
	}
	i2 := other.(Int)
	return i == i2
}
604508
func (o *UserTokenOption) Equal(o2 *UserTokenOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
488907
func (o *SortFacetValuesByOption) Equal(o2 *SortFacetValuesByOption) bool {
	if o2 == nil {
		return o.value == "count"
	}
	return o.value == o2.value
}
124188
func (o *LengthOption) Equal(o2 *LengthOption) bool {
	if o2 == nil {
		return o.value == 0
	}
	return o.value == o2.value
}
1254631
func (o *RemoveStopWordsOption) Equal(o2 *RemoveStopWordsOption) bool {
	if o2 == nil {
		return !o.removeStopWords && len(o.languages) == 0
	}
	return reflect.DeepEqual(o, o2)
}
370880
func (c *Constant) Equal(b Expression, ctx context.Context) bool {
	y, ok := b.(*Constant)
	if !ok {
		return false
	}
	con, err := c.Value.CompareDatum(ctx.GetSessionVars().StmtCtx, y.Value)
	if err != nil || con != 0 {
		return false
	}
	return true
}
794574
func Equal(a, b interface{}) bool {
	if a == nil && b == nil {
		return a == b
	}

	return reflect.DeepEqual(a, b)
}
1136235
func (b *Boolean) Equal(value bool) *Boolean {
	if !(b.value == value) {
		b.chain.fail("expected boolean == %v, but got %v", value, b.value)
	}
	return b
}