From f58dee2139145a1f4f477fe7cc16d6329cb39e6c Mon Sep 17 00:00:00 2001 From: Matthew Nibecker Date: Mon, 8 Jun 2026 12:22:22 -0700 Subject: [PATCH] arith exprs: Handle fusion values --- runtime/vam/expr/arith.go | 2 +- runtime/ztests/expr/arith-nulls.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/runtime/vam/expr/arith.go b/runtime/vam/expr/arith.go index dead4c81e8..8b5449b06e 100644 --- a/runtime/vam/expr/arith.go +++ b/runtime/vam/expr/arith.go @@ -24,7 +24,7 @@ func NewArith(sctx *super.Context, op string, lhs, rhs Evaluator) *Arith { } func (a *Arith) Eval(val vector.Any) vector.Any { - return vector.Apply(vector.ApplyRipUnions, a.eval, a.lhs.Eval(val), a.rhs.Eval(val)) + return vector.Apply(vector.ApplyRipUnions|vector.ApplyRipFusions, a.eval, a.lhs.Eval(val), a.rhs.Eval(val)) } func (a *Arith) eval(vecs ...vector.Any) (out vector.Any) { diff --git a/runtime/ztests/expr/arith-nulls.yaml b/runtime/ztests/expr/arith-nulls.yaml index ca4f0f6556..8c6d51dd12 100644 --- a/runtime/ztests/expr/arith-nulls.yaml +++ b/runtime/ztests/expr/arith-nulls.yaml @@ -5,6 +5,7 @@ input: | {a:null,b:1} {a:null,b:null} {a:null::(int64|null),b:2::(int64|null)} + {a:fusion(null::(int64|null),),b:fusion(2::(int64|null),)} output: | null @@ -27,3 +28,8 @@ output: | null null null + null + null + null + null + null