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

Function arithAddIntDictView

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

Source from the content-addressed store, hash-verified

81}
82
83func arithAddIntDictView(lhs, rhs vector.Any) vector.Any {
84 ld := lhs.(*vector.Dict)
85 l := ld.Any.(*vector.Int)
86 lx := ld.Index
87 rd := rhs.(*vector.View)
88 r := rd.Any.(*vector.Int)
89 rx := rd.Index
90 n := lhs.Len()
91 out := vector.NewIntEmpty(lhs.Type(), n)
92 for k := range n {
93 out.Append(l.Value(uint32(lx[k])) + r.Value(uint32(rx[k])))
94 }
95 return out
96}
97
98func arithAddIntDictConst(lhs, rhs vector.Any) vector.Any {
99 ld := lhs.(*vector.Dict)

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