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

Function recordOf

compiler/semantic/schema.go:129–146  ·  view source on GitHub ↗
(typ super.Type)

Source from the content-addressed store, hash-verified

127}
128
129func recordOf(typ super.Type) *super.TypeRecord {
130 switch typ := super.TypeUnder(typ).(type) {
131 case *super.TypeRecord:
132 return typ
133 case *super.TypeUnion:
134 if hasUnknown(typ) {
135 return nil
136 }
137 // We assume here this is a fused type and thus has only one record
138 // type in the union.
139 for _, typ := range typ.Types {
140 if typ := recordOf(typ); typ != nil {
141 return typ
142 }
143 }
144 }
145 return nil
146}
147
148func newJoinUsingScope(j *joinScope, columns []string) *joinUsingScope {
149 skip := make(map[string]struct{})

Callers 1

newTableFromTypeFunction · 0.85

Calls 2

TypeUnderFunction · 0.92
hasUnknownFunction · 0.85

Tested by

no test coverage detected