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

Function arithAddIntFlatConst

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

Source from the content-addressed store, hash-verified

42}
43
44func arithAddIntFlatConst(lhs, rhs vector.Any) vector.Any {
45 l := lhs.(*vector.Int)
46 rconst := vector.IntValue(rhs, 0)
47 n := lhs.Len()
48 out := vector.NewIntEmpty(lhs.Type(), n)
49 for k := range n {
50 out.Append(l.Value(k) + rconst)
51 }
52 return out
53}
54
55func arithAddIntDictFlat(lhs, rhs vector.Any) vector.Any {
56 ld := lhs.(*vector.Dict)

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