MCPcopy Create free account
hub / github.com/brimdata/super / compareEQStringViewConst

Function compareEQStringViewConst

runtime/vam/expr/comparefuncs.go:875–888  ·  view source on GitHub ↗
(lhs, rhs vector.Any)

Source from the content-addressed store, hash-verified

873}
874
875func compareEQStringViewConst(lhs, rhs vector.Any) vector.Any {
876 ld := lhs.(*vector.View)
877 l := ld.Any.(*vector.String)
878 lx := ld.Index
879 rconst := vector.StringValue(rhs, 0)
880 n := lhs.Len()
881 out := vector.NewFalse(n)
882 for k := range n {
883 if l.Value(uint32(lx[k])) == rconst {
884 out.Set(k)
885 }
886 }
887 return out
888}
889
890func compareEQStringConstFlat(lhs, rhs vector.Any) vector.Any {
891 lconst := vector.StringValue(lhs, 0)

Callers

nothing calls this directly

Calls 5

StringValueFunction · 0.92
NewFalseFunction · 0.92
LenMethod · 0.65
ValueMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected