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

Function unwrapSpread

runtime/vam/expr/arrayexpr.go:120–131  ·  view source on GitHub ↗
(vec vector.Any)

Source from the content-addressed store, hash-verified

118}
119
120func unwrapSpread(vec vector.Any) (vector.Any, []uint32, []uint32) {
121 switch vec := vec.(type) {
122 case *vector.Array:
123 return vec.Values, vec.Offsets, nil
124 case *vector.Set:
125 return vec.Values, vec.Offsets, nil
126 case *vector.View:
127 vals, offsets, _ := unwrapSpread(vec.Any)
128 return vals, offsets, vec.Index
129 }
130 return nil, nil, nil
131}
132
133func mergeSameTypeVecs(sctx *super.Context, typ super.Type, tags []uint32, vecs []vector.Any) vector.Any {
134 // XXX This is going to be slow. At some point would nice to write a native

Callers 1

buildListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected