Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions runtime/ztests/expr/dot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ input: |
{a:{b:1}}::(int64|{a:{b:int64}})
{a:fusion({b:1}::(null|{b:int64}),<{b:int64}>)}
{a:fusion(null::(null|{b:int64}),<null>)}
{a:fusion({b:fusion(_::(int64|string|none) ,<none>)},<{}>)}
{a:1}
{}
null
Expand All @@ -21,6 +22,7 @@ output: |
error("missing")
error("missing")
error("missing")
error("missing")

---

Expand Down
8 changes: 6 additions & 2 deletions vector/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func noneLength(runlens []uint32) uint32 {
}

func DeoptionWithMissing(sctx *super.Context, vec Any) Any {
switch vec := vec.(type) {
switch vec := Super(vec).(type) {
case *None:
return NewMissing(sctx, vec.Len())
case *Dynamic:
Expand Down Expand Up @@ -347,7 +347,11 @@ func hasOptionTypesOrNones(vecs []Any) bool {
if vec, ok := vec.(*Dynamic); ok {
return hasOptionTypesOrNones(vec.Values)
}
return super.IsOptionType(vec.Type()) || vec.Type() == super.TypeNone
typ := vec.Type()
if fusion, ok := typ.(*super.TypeFusion); ok {
typ = fusion.Type
}
return super.IsOptionType(typ) || typ == super.TypeNone
}) >= 0
}

Expand Down
Loading