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

Method innerTypeOf

runtime/sam/expr/function/flatten.go:39–46  ·  view source on GitHub ↗
(typ *super.TypeRecord, b scode.Bytes)

Source from the content-addressed store, hash-verified

37}
38
39func (n *Flatten) innerTypeOf(typ *super.TypeRecord, b scode.Bytes) super.Type {
40 n.types = n.appendTypes(n.types[:0], b, typ)
41 unique := super.UniqueTypes(n.types)
42 if len(unique) == 1 {
43 return unique[0]
44 }
45 return n.sctx.LookupTypeUnion(unique)
46}
47
48func (n *Flatten) appendTypes(types []super.Type, b scode.Bytes, typ *super.TypeRecord) []super.Type {
49 it := scode.NewRecordIter(b, typ.Opts)

Callers 1

CallMethod · 0.95

Calls 3

appendTypesMethod · 0.95
UniqueTypesFunction · 0.92
LookupTypeUnionMethod · 0.80

Tested by

no test coverage detected