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

Function arithAddIntViewConst

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

Source from the content-addressed store, hash-verified

152}
153
154func arithAddIntViewConst(lhs, rhs vector.Any) vector.Any {
155 ld := lhs.(*vector.View)
156 l := ld.Any.(*vector.Int)
157 lx := ld.Index
158 rconst := vector.IntValue(rhs, 0)
159 n := lhs.Len()
160 out := vector.NewIntEmpty(lhs.Type(), n)
161 for k := range n {
162 out.Append(l.Value(uint32(lx[k])) + rconst)
163 }
164 return out
165}
166
167func arithAddIntConstFlat(lhs, rhs vector.Any) vector.Any {
168 lconst := vector.IntValue(lhs, 0)

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