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
Describe the bug, including details regarding any error messages, version, and platform.
On current main (e611f48081), expression binding can incorrectly treat mixed decimal arguments to coalesce as an exact kernel match. This bypasses the decimal normalization in CoalesceFunction::DispatchBest and leaves the bound expression without the required cast to a common decimal type.
With left = [1.23, null] and right = [null, 2.345], executing the incorrectly bound expression fails with:
Type error: All types must be compatible, expected: decimal128(3, 2), but got: decimal128(4, 3)
The expected result is a decimal128(4, 3) array containing [1.230, 2.345].
Calling DispatchBest directly already normalizes these arguments correctly. The problem is that expression binding tries DispatchExact first, and the broad decimal varargs signature accepts the mixed concrete decimal types before DispatchBest can insert the cast.
This appears to be another instance of the exact-dispatch constraint problem addressed more generally by #47287 and the MatchConstraint mechanism introduced in #47297.
Activity
apacheGH-50869: [C++][Compute] Tighten coalesce exact dispatch for de…
apacheGH-50869: [C++][Compute] Tighten coalesce exact dispatch for de…
apacheGH-50869: [C++][Compute] Generalize same-type constraint
apacheGH-50869: [C++][Compute] Clarify identical-type constraint names
apacheGH-50869: [C++][Compute] Address coalesce review feedback
GH-50869: [C++][Compute] Tighten coalesce exact dispatch for decimal …
pitrou commentedon Sep 7, 2026
Issue resolved by pull request 50870
#50870