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

Method appendSpread

runtime/sam/expr/values.go:391–402  ·  view source on GitHub ↗
(inner super.Type, b scode.Bytes)

Source from the content-addressed store, hash-verified

389}
390
391func (c *collectionBuilder) appendSpread(inner super.Type, b scode.Bytes) {
392 union, _ := super.TypeUnder(inner).(*super.TypeUnion)
393 for it := b.Iter(); !it.Done(); {
394 typ := inner
395 bytes := it.Next()
396 if union != nil {
397 typ, bytes = union.Untag(bytes)
398 }
399 c.types = append(c.types, typ)
400 c.bytes = append(c.bytes, bytes)
401 }
402}
403
404func (c *collectionBuilder) iter(sctx *super.Context) collectionIter {
405 // uniqueTypes must be copied since super.UniqueTypes operates on the type

Callers 2

EvalMethod · 0.80
EvalMethod · 0.80

Calls 5

TypeUnderFunction · 0.92
IterMethod · 0.80
UntagMethod · 0.80
DoneMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected