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

Method hasFusion

runtime/sam/expr/function/defuse.go:160–181  ·  view source on GitHub ↗
(typ super.Type)

Source from the content-addressed store, hash-verified

158}
159
160func (d *defuse) hasFusion(typ super.Type) bool {
161 if fused, ok := d.has[typ]; ok {
162 return fused
163 }
164 var has bool
165 switch typ := typ.(type) {
166 case *super.TypeRecord:
167 has = slices.ContainsFunc(typ.Fields, func(f super.Field) bool { return d.hasFusion(f.Type) })
168 case *super.TypeArray:
169 has = d.hasFusion(typ.Type)
170 case *super.TypeSet:
171 has = d.hasFusion(typ.Type)
172 case *super.TypeMap:
173 has = d.hasFusion(typ.KeyType) || d.hasFusion(typ.ValType)
174 case *super.TypeError:
175 has = d.hasFusion(typ.Type)
176 case *super.TypeFusion:
177 has = true
178 }
179 d.has[typ] = has
180 return has
181}

Callers 1

evalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected