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")