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

Method Call

runtime/vam/expr/function/types.go:208–224  ·  view source on GitHub ↗
(args ...vector.Any)

Source from the content-addressed store, hash-verified

206}
207
208func (k *Kind) Call(args ...vector.Any) vector.Any {
209 vec := vector.Under(args[0])
210 if typ := vec.Type(); typ.ID() != super.IDType {
211 s := typ.Kind().String()
212 return vector.NewConstString(s, vec.Len())
213 }
214 out := vector.NewStringEmpty(vec.Len())
215 for i, n := uint32(0), vec.Len(); i < n; i++ {
216 bytes := vector.TypeValueValue(vec, i)
217 typ, err := k.sctx.LookupByValue(bytes)
218 if err != nil {
219 panic(err)
220 }
221 out.Append(typ.Kind().String())
222 }
223 return out
224}
225
226func (*Kind) RipUnions() bool {
227 return false

Callers

nothing calls this directly

Calls 11

UnderFunction · 0.92
NewConstStringFunction · 0.92
NewStringEmptyFunction · 0.92
TypeValueValueFunction · 0.92
LookupByValueMethod · 0.80
TypeMethod · 0.65
IDMethod · 0.65
StringMethod · 0.65
KindMethod · 0.65
LenMethod · 0.65
AppendMethod · 0.45

Tested by

no test coverage detected