// Equal compares the Result with another one.
// reflect.DeepEqual shouldn't be used because of the protos.
177161
func (result *Result) Equal(other *Result) bool {
	// Check for nil cases
	if result == nil {
		return other == nil
	}
	if other == nil {
		return false
	}

	// Compare Fields, RowsAffected, InsertID, Rows, Extras.
	return FieldsEqual(result.Fields, other.Fields) &&
		result.RowsAffected == other.RowsAffected &&
		result.InsertID == other.InsertID &&
		reflect.DeepEqual(result.Rows, other.Rows) &&
		proto.Equal(result.Extras, other.Extras)
}
576865
func (o *AroundPrecisionOption) Equal(o2 *AroundPrecisionOption) bool {
	if o2 == nil {
		return o.value == 1
	}
	return o.value == o2.value
}
1201775
func (t proofTerm) equal(u proofTerm) bool {
	return t.seqno() == u.seqno()
}
305538
func (sf *ScalarFunction) Equal(ctx sessionctx.Context, e Expression) bool {
	fun, ok := e.(*ScalarFunction)
	if !ok {
		return false
	}
	if sf.FuncName.L != fun.FuncName.L {
		return false
	}
	return sf.Function.equal(fun.Function)
}
433721
func (o *AroundRadiusOption) Equal(o2 *AroundRadiusOption) bool {
	if o2 == nil {
		return !o.isAll && o.meters == 0
	}
	return reflect.DeepEqual(o, o2)
}
797041
func (v *Value) Equal(value interface{}) *Value {
	expected, ok := canonValue(&v.chain, value)
	if !ok {
		return v
	}
	if !reflect.DeepEqual(expected, v.value) {
		v.chain.fail("\nexpected value equal to:\n%s\n\nbut got:\n%s\n\ndiff:\n%s",
			dumpValue(expected),
			dumpValue(v.value),
			diffValues(expected, v.value))
	}
	return v
}
604508
func (o *UserTokenOption) Equal(o2 *UserTokenOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
61100
func (self FloatEqualer) Equal(e Equaler) bool {
	return self.F == e.(FloatEqualer).F
}
398146
func (o *MaxFacetHitsOption) Equal(o2 *MaxFacetHitsOption) bool {
	if o2 == nil {
		return o.value == 10
	}
	return o.value == o2.value
}
225708
func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {

	if !ObjectsAreEqual(expected, actual) {
		diff := diff(expected, actual)
		return Fail(t, fmt.Sprintf("Not equal: %#v (expected)\n"+
			"        != %#v (actual)%s", expected, actual, diff), msgAndArgs...)
	}

	return true

}
134140
func (s *String) Equal(value string) *String {
	if !(s.value == value) {
		s.chain.fail("\nexpected string equal to:\n %q\n\nbut got:\n %q",
			value, s.value)
	}
	return s
}
523348
func (o *RestrictHighlightAndSnippetArraysOption) Equal(o2 *RestrictHighlightAndSnippetArraysOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
1291636
func (o *SynonymsOption) Equal(o2 *SynonymsOption) bool {
	if o2 == nil {
		return o.value == true
	}
	return o.value == o2.value
}
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
}
716848
func (o *DistinctOption) Equal(o2 *DistinctOption) bool {
	if o2 == nil {
		return o.value == 0
	}
	return o.value == o2.value
}
1115857
func (o *LimitOption) Equal(o2 *LimitOption) bool {
	if o2 == nil {
		return o.value == 10
	}
	return o.value == o2.value
}
419363
func (o *OptionalFiltersOption) Equal(o2 *OptionalFiltersOption) bool {
	return o.comp.Equal(&o2.comp)
}