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

Function arithAddIntViewDict

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

Source from the content-addressed store, hash-verified

122}
123
124func arithAddIntViewDict(lhs, rhs vector.Any) vector.Any {
125 ld := lhs.(*vector.View)
126 l := ld.Any.(*vector.Int)
127 lx := ld.Index
128 rd := rhs.(*vector.Dict)
129 r := rd.Any.(*vector.Int)
130 rx := rd.Index
131 n := lhs.Len()
132 out := vector.NewIntEmpty(lhs.Type(), n)
133 for k := range n {
134 out.Append(l.Value(uint32(lx[k])) + r.Value(uint32(rx[k])))
135 }
136 return out
137}
138
139func arithAddIntViewView(lhs, rhs vector.Any) vector.Any {
140 ld := lhs.(*vector.View)

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