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

Method buildVal

runtime/sam/expr/map.go:51–63  ·  view source on GitHub ↗
(inner super.Type)

Source from the content-addressed store, hash-verified

49}
50
51func (a *mapCall) buildVal(inner super.Type) []byte {
52 a.builder.Reset()
53 if union, ok := inner.(*super.TypeUnion); ok {
54 for _, val := range a.vals {
55 super.BuildUnion(&a.builder, union.TagOf(val.Type()), val.Bytes())
56 }
57 } else {
58 for _, val := range a.vals {
59 a.builder.Append(val.Bytes())
60 }
61 }
62 return a.builder.Bytes()
63}
64
65func (a *mapCall) innerType(types []super.Type) super.Type {
66 types = super.UniqueTypes(types)

Callers 1

EvalMethod · 0.95

Calls 6

BuildUnionFunction · 0.92
TagOfMethod · 0.80
TypeMethod · 0.65
ResetMethod · 0.45
BytesMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected