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

Function arithAddIntFlatView

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

Source from the content-addressed store, hash-verified

29}
30
31func arithAddIntFlatView(lhs, rhs vector.Any) vector.Any {
32 l := lhs.(*vector.Int)
33 rd := rhs.(*vector.View)
34 r := rd.Any.(*vector.Int)
35 rx := rd.Index
36 n := lhs.Len()
37 out := vector.NewIntEmpty(lhs.Type(), n)
38 for k := range n {
39 out.Append(l.Value(k) + r.Value(uint32(rx[k])))
40 }
41 return out
42}
43
44func arithAddIntFlatConst(lhs, rhs vector.Any) vector.Any {
45 l := lhs.(*vector.Int)

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected