// Equal checks whether the set has same elements with another set.
189267
func (s Set) Equal(t Set) bool {
	if len(s) != len(t) {
		return false
	}

	for el := range s {
		if !t.Contain(el) {
			return false
		}
	}

	return true
}
972344
func (b *BitSet) Equal(c *BitSet) bool {
	if c == nil {
		return false
	}
	if b.length != c.length {
		return false
	}
	if b.length == 0 { // if they have both length == 0, then could have nil set
		return true
	}
	// testing for equality shoud not transform the bitset (no call to safeSet)

	for p, v := range b.set {
		if c.set[p] != v {
			return false
		}
	}
	return true
}
1187760
func (o *MaxValuesPerFacetOption) Equal(o2 *MaxValuesPerFacetOption) bool {
	if o2 == nil {
		return o.value == 100
	}
	return o.value == o2.value
}
693020
func (ls LabelSet) Equal(o LabelSet) bool {
	if len(ls) != len(o) {
		return false
	}
	for ln, lv := range ls {
		olv, ok := o[ln]
		if !ok {
			return false
		}
		if olv != lv {
			return false
		}
	}
	return true
}
207261
func (o *TypeOption) Equal(o2 *TypeOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
665247
func (gtidSet MariadbGTIDSet) Equal(other GTIDSet) bool {
	mdbOther, ok := other.(MariadbGTIDSet)
	if !ok {
		return false
	}
	if len(gtidSet) != len(mdbOther) {
		return false
	}
	for i, gtid := range gtidSet {
		if gtid != mdbOther[i] {
			return false
		}
	}
	return true
}
429541
func (o *GetRankingInfoOption) Equal(o2 *GetRankingInfoOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
493784
func equal(s Set, s2 Set) bool {
	if s.Len() != s2.Len() {
		return false
	}

	return s.IsSubset(s2)
}
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)
}
568354
func (o *FacetFiltersOption) Equal(o2 *FacetFiltersOption) bool {
	return o.comp.Equal(&o2.comp)
}
145552
func (v Var) Equal(other Value) bool {
	switch other := other.(type) {
	case Var:
		return v == other
	default:
		return false
	}
}
439602
func (rs RuleSet) Equal(other RuleSet) bool {
	return len(rs.Diff(other)) == 0 && len(other.Diff(rs)) == 0
}
523348
func (o *RestrictHighlightAndSnippetArraysOption) Equal(o2 *RestrictHighlightAndSnippetArraysOption) bool {
	if o2 == nil {
		return o.value == false
	}
	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
}
552224
func (i *i) Equal(a, b interface{}) {
	if !areEqual(a, b) {
		i.Logf("%v != %v", a, b)
	}
}
1255767
func (t SimpleType) Equal(u convert.Equaler) bool {
	other, ok := u.(SimpleType)
	if !ok {
		return false
	}
	if t.DefaultValue != other.DefaultValue {
		return false
	}
	return t.Kind == other.Kind
}
1112465
func (o *AllowTyposOnNumericTokensOption) Equal(o2 *AllowTyposOnNumericTokensOption) bool {
	if o2 == nil {
		return o.value == true
	}
	return o.value == o2.value
}