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
[C++][Compute] case_when can accept incompatible parameterized value types and return corrupted results #50624
Describe the bug, including details regarding any error messages, version, and platform.
case_when should either find a valid common output type for its value arguments or fail when the value types are incompatible.
On current main, some incompatible parameterized value types are incorrectly accepted and the call returns successful but corrupted results instead of failing.
I reproduced this on origin/main at aa78eb8973 on macOS arm64 (AppleClang 17) on July 23, 2026.
Using CallFunction("case_when", ...):
fixed_size_binary width mismatch
Input: case_when(cond=[true], left=["abcd"] as fixed_size_binary(4), right=["efghi"] as fixed_size_binary(5))
Actual: OK [fixed_size_binary[5]]: ["abcdi"]
Expected:
The call should fail because the value argument types are incompatible.
list value type mismatch
Input: case_when(cond=[true], left=[[1, 2]] as list<int16>, right=[[3, 4]] as list<int32>)
Actual: OK [list<item: int32>]: [[131073, 0]]
Expected:
The call should fail because the value argument types are incompatible.
fixed_size_list size mismatch
Input: case_when(cond=[true], left=[[1, 2]] as fixed_size_list<int32, 2>, right=[[3, 4, 5]] as fixed_size_list<int32, 3>)
Actual: OK [fixed_size_list<item: int32>[3]]: [[1, 2, 0]]
Expected:
The call should fail because the value argument types are incompatible.
I also reproduced the same incorrect success for struct<a: int32> vs struct<a: int64>.
This looks like another instance of the broader exact-dispatch problem discussed in #47287, but here it affects case_when with incompatible parameterized value types.
Activity
apacheGH-50624: Clarify case_when constraint ownership
GH-50624: [C++][Compute] Tighten case_when exact dispatch for paramet…
zanmato1984 commentedon Jul 27, 2026
Issue resolved by pull request 50625
#50625