// eq returns whether this and that are equal.
1700
func eq(this, that *MyStruct) bool {
	return (this == nil && that == nil) ||
		this != nil && that != nil &&
			this.Int64 == that.Int64 &&
			((this.StringPtr == nil && that.StringPtr == nil) || (this.StringPtr != nil && that.StringPtr != nil && *(this.StringPtr) == *(that.StringPtr)))
}
323175
func (t Term) Eq(args ...interface{}) Term {
	return constructMethodTerm(t, "Eq", p.Term_EQ, args, map[string]interface{}{})
}
319900
func (l *LabelSelector) Eq(key, val string) {
	if !validLabelValue(key) || !validLabelValue(val) {
		return
	}
	l.stmts = append(l.stmts, key+"="+val)
}
1214267
func (p Pitch) Eq(o Pitch) bool {
	return p.Interval.Eq(o.Interval)
}
249416
func (e *ExponentialStrategy) IsEqual(o *ExponentialStrategy) bool {
	if e.opts.first != o.opts.first {
		return false
	}
	if e.opts.max != o.opts.max {
		return false
	}
	return true
}
107002
func eq(arg1 interface{}, arg2 ...interface{}) (bool, error) {
	v1 := reflect.ValueOf(arg1)
	k1, err := basicKind(v1)
	if err != nil {
		return false, err
	}
	if len(arg2) == 0 {
		return false, errNoComparison
	}
	for _, arg := range arg2 {
		v2 := reflect.ValueOf(arg)
		k2, err := basicKind(v2)
		if err != nil {
			return false, err
		}
		if k1 != k2 {
			return false, errBadComparison
		}
		truth := false
		switch k1 {
		case boolKind:
			truth = v1.Bool() == v2.Bool()
		case complexKind:
			truth = v1.Complex() == v2.Complex()
		case floatKind:
			truth = v1.Float() == v2.Float()
		case intKind:
			truth = v1.Int() == v2.Int()
		case stringKind:
			truth = v1.String() == v2.String()
		case uintKind:
			truth = v1.Uint() == v2.Uint()
		default:
			panic("invalid kind")
		}
		if truth {
			return true, nil
		}
	}
	return false, nil
}
552224
func (i *i) Equal(a, b interface{}) {
	if !areEqual(a, b) {
		i.Logf("%v != %v", a, b)
	}
}
1163065
func (o *AnchoringOption) Equal(o2 *AnchoringOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
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)
}
523348
func (o *RestrictHighlightAndSnippetArraysOption) Equal(o2 *RestrictHighlightAndSnippetArraysOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
1187760
func (o *MaxValuesPerFacetOption) Equal(o2 *MaxValuesPerFacetOption) bool {
	if o2 == nil {
		return o.value == 100
	}
	return o.value == o2.value
}
961502
func (o *ReplaceSynonymsInHighlightOption) Equal(o2 *ReplaceSynonymsInHighlightOption) bool {
	if o2 == nil {
		return o.value == true
	}
	return o.value == o2.value
}
517848
func (c *Constant) Equal(ctx sessionctx.Context, b Expression) bool {
	y, ok := b.(*Constant)
	if !ok {
		return false
	}
	_, err1 := y.Eval(chunk.Row{})
	_, err2 := c.Eval(chunk.Row{})
	if err1 != nil || err2 != nil {
		return false
	}
	con, err := c.Value.CompareDatum(ctx.GetSessionVars().StmtCtx, &y.Value)
	if err != nil || con != 0 {
		return false
	}
	return true
}
804989
func (d Date) Equal(e Date) bool {
	return d.t.Equal(e.t)
}
1277527
func Eq(lhs, rhs Expression) BoolExpression {
	lit, ok := rhs.(*literalExpression)
	if ok && sqltypes.Value(lit.value).IsNull() {
		return newBoolExpression(lhs, rhs, []byte(" IS "))
	}
	return newBoolExpression(lhs, rhs, []byte("="))
}
576865
func (o *AroundPrecisionOption) Equal(o2 *AroundPrecisionOption) bool {
	if o2 == nil {
		return o.value == 1
	}
	return o.value == o2.value
}
410600
func (lp LockedProject) Eq(lp2 LockedProject) bool {
	if lp.pi != lp2.pi {
		return false
	}

	if lp.r != lp2.r {
		return false
	}

	if len(lp.pkgs) != len(lp2.pkgs) {
		return false
	}

	for k, v := range lp.pkgs {
		if lp2.pkgs[k] != v {
			return false
		}
	}

	v1n := lp.v == nil
	v2n := lp2.v == nil

	if v1n != v2n {
		return false
	}

	if !v1n && !lp.v.Matches(lp2.v) {
		return false
	}

	return true
}