From 6bd07f8c2b92eaa522e406b12eba19eaf0f1ce0e Mon Sep 17 00:00:00 2001 From: Matthew Nibecker Date: Fri, 22 May 2026 12:29:51 -0700 Subject: [PATCH] vam.Dot expr: Fix fusion unions --- runtime/vam/expr/dot.go | 2 ++ runtime/ztests/expr/dot.yaml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/runtime/vam/expr/dot.go b/runtime/vam/expr/dot.go index 067d9ab3a..b4c9d5b98 100644 --- a/runtime/vam/expr/dot.go +++ b/runtime/vam/expr/dot.go @@ -66,6 +66,8 @@ func (d *DotExpr) eval(vecs ...vector.Any) vector.Any { case *vector.Map: keyVec := vector.NewConstString(d.field, val.Len()) return indexMap(d.sctx, val, keyVec) + case *vector.Union: + return vector.Apply(false, d.eval, val.Dynamic()) case *vector.View: return vector.Pick(d.eval(val.Any), val.Index) default: diff --git a/runtime/ztests/expr/dot.yaml b/runtime/ztests/expr/dot.yaml index b61c8de18..341182944 100644 --- a/runtime/ztests/expr/dot.yaml +++ b/runtime/ztests/expr/dot.yaml @@ -5,6 +5,8 @@ input: | {a:{b:1::(int64|string)}} {a:{b:1}::(int64|{b:int64})} {a:{b:1}}::(int64|{a:{b:int64}}) + {a:fusion({b:1}::(null|{b:int64}),<{b:int64}>)} + {a:fusion(null::(null|{b:int64}),)} {a:1} {} null @@ -14,6 +16,8 @@ output: | 1::(int64|string) 1 1 + 1 + error("missing") error("missing") error("missing") error("missing")