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

Function arithAddIntDictConst

runtime/vam/expr/arithfuncs.go:98–109  ·  view source on GitHub ↗
(lhs, rhs vector.Any)

Source from the content-addressed store, hash-verified

96}
97
98func arithAddIntDictConst(lhs, rhs vector.Any) vector.Any {
99 ld := lhs.(*vector.Dict)
100 l := ld.Any.(*vector.Int)
101 lx := ld.Index
102 rconst := vector.IntValue(rhs, 0)
103 n := lhs.Len()
104 out := vector.NewIntEmpty(lhs.Type(), n)
105 for k := range n {
106 out.Append(l.Value(uint32(lx[k])) + rconst)
107 }
108 return out
109}
110
111func arithAddIntViewFlat(lhs, rhs vector.Any) vector.Any {
112 ld := lhs.(*vector.View)

Callers

nothing calls this directly

Calls 6

IntValueFunction · 0.92
NewIntEmptyFunction · 0.92
LenMethod · 0.65
TypeMethod · 0.65
AppendMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected