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.
Component(s)
C++
Describe the bug, including details regarding any error messages, version, and platform.
case_whenshould 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/mainataa78eb8973on macOS arm64 (AppleClang 17) on July 23, 2026.Using
CallFunction("case_when", ...):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.
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.
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>vsstruct<a: int64>.This looks like another instance of the broader exact-dispatch problem discussed in #47287, but here it affects
case_whenwith incompatible parameterized value types.Component(s)
C++