MCPcopy
hub / github.com/grafana/tempo / StrictEquals

Method StrictEquals

pkg/traceql/ast.go:876–895  ·  view source on GitHub ↗
(o *Static)

Source from the content-addressed store, hash-verified

874}
875
876func (s Static) StrictEquals(o *Static) bool {
877 if s.Type != o.Type {
878 return false
879 }
880
881 switch s.Type {
882 case TypeFloat:
883 sf := math.Float64frombits(s.valScalar)
884 of := math.Float64frombits(o.valScalar)
885 return sf == of
886 case TypeString, TypeIntArray, TypeFloatArray, TypeBooleanArray:
887 return bytes.Equal(s.valBytes, o.valBytes)
888 case TypeStringArray:
889 return slices.Equal(s.valStrings, o.valStrings)
890 case TypeNil:
891 return true
892 default:
893 return s.valScalar == o.valScalar
894 }
895}
896
897func (s Static) IsNil() bool {
898 return s.Type == TypeNil

Callers 3

operandsEqualFunction · 0.80
operandsEqualFunction · 0.80
operandsEqualFunction · 0.80

Calls 1

EqualMethod · 0.45

Tested by

no test coverage detected