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

Function unionOf

runtime/sam/expr/values.go:437–446  ·  view source on GitHub ↗
(sctx *super.Context, types []super.Type)

Source from the content-addressed store, hash-verified

435}
436
437func unionOf(sctx *super.Context, types []super.Type) super.Type {
438 if len(types) == 0 {
439 return super.TypeNull
440 }
441 unique := super.UniqueTypes(types)
442 if len(unique) == 1 {
443 return unique[0]
444 }
445 return sctx.LookupTypeUnion(unique)
446}

Callers 1

iterMethod · 0.70

Calls 2

UniqueTypesFunction · 0.92
LookupTypeUnionMethod · 0.80

Tested by

no test coverage detected