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

Method newArray

runtime/vam/op/cachedsubquery.go:52–59  ·  view source on GitHub ↗

newArray returns a vector whose single element is an array of elems.

(elems vector.Any)

Source from the content-addressed store, hash-verified

50
51// newArray returns a vector whose single element is an array of elems.
52func (c *cachedSubquery) newArray(elems vector.Any) vector.Any {
53 if d, ok := elems.(*vector.Dynamic); ok {
54 elems = vector.NewUnionFromDynamic(c.sctx, d)
55 }
56 arrayType := c.sctx.LookupTypeArray(elems.Type())
57 offsets := []uint32{0, elems.Len()}
58 return vector.NewArray(arrayType, offsets, elems)
59}
60
61// vectorConcat returns a vector concatenating vecs.
62func (c *cachedSubquery) vectorConcat(vecs []vector.Any) vector.Any {

Callers 1

execMethod · 0.95

Calls 5

NewUnionFromDynamicFunction · 0.92
NewArrayFunction · 0.92
LookupTypeArrayMethod · 0.80
TypeMethod · 0.65
LenMethod · 0.65

Tested by

no test coverage detected