You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace duplicated scalar/array broadcast match in math_funcs with a shared helper #6982
The same match that turns a (ColumnarValue, ColumnarValue) pair into two equal-length ArrayRefs is pasted into several math functions in native/spark-expr/src/math_funcs/:
The copies are identical apart from variable names, so there is no drift today, but they all need to change together if scalar broadcasting behaviour changes.
Describe the potential solution
Replace the copies with ColumnarValue::values_to_arrays(&[left, right]) from DataFusion, or, if the scalar-scalar length-1 behaviour needs to stay explicit, a single broadcast_pair(l, r) -> Result<(ArrayRef, ArrayRef)> helper in math_funcs, and call it from each site.
Additional context
This is small and a good first issue. Line references are pinned to commit 7d8d9b1.
I verified the duplicated scalar/array broadcasting logic and would like to consolidate it using ColumnarValue::values_to_arrays, provided it preserves the existing scalar-scalar and error behavior.
I'll add focused regression coverage and run the relevant expression tests.
I noticed the issue still has requires-triage. Is it ready for an external contributor to pick up?
Activity
med9110 commentedon Oct 15, 2026
Hi @andygrove, I'd be interested in contributing to #6982.
I verified the duplicated scalar/array broadcasting logic and would like to consolidate it using
ColumnarValue::values_to_arrays, provided it preserves the existing scalar-scalar and error behavior.I'll add focused regression coverage and run the relevant expression tests.
I noticed the issue still has
requires-triage. Is it ready for an external contributor to pick up?