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

Method Deunion

value.go:437–449  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

435}
436
437func (v Value) Deunion() Value {
438 for {
439 typ := v.Type()
440 if named, ok := typ.(*TypeNamed); ok {
441 typ = named.Type
442 }
443 union, ok := typ.(*TypeUnion)
444 if !ok {
445 return v
446 }
447 v = NewValue(union.Untag(v.bytes()))
448 }
449}
450
451// Under resolves named types and untags unions repeatedly, returning a value
452// guaranteed not to have a fusion type, named type or union type.

Callers 11

decodeAnyMethod · 0.80
EvalMethod · 0.80
EvalMethod · 0.80
EvalMethod · 0.80
EvalMethod · 0.80
ApplyMethod · 0.80
evalMethod · 0.80
CastMethod · 0.80
toUnionMethod · 0.80
evalMethod · 0.80
unnestMethod · 0.80

Calls 4

TypeMethod · 0.95
bytesMethod · 0.95
NewValueFunction · 0.85
UntagMethod · 0.80

Tested by

no test coverage detected