zanmato1984 opened a new issue, #55404:
URL: https://github.com/apache/arrow/issues/55404
### Describe the bug, including details regarding any error messages,
version, and platform.
A bound `coalesce` expression fails at execution when dictionary arguments
have compatible value types but differ in index type, value type, or the
ordered flag.
For example, consider `coalesce(x, y)` with these dictionary-encoded inputs:
```text
x: dictionary<values=int32, indices=int8, ordered=0>
values: [10, null, 30, null, null]
y: dictionary<values=int32, indices=int16, ordered=0>
values: [null, 20, 40, null, null]
```
Expression binding succeeds, but execution returns:
```text
Type error: All types must be compatible,
expected: dictionary<values=int32, indices=int8, ordered=0>,
but got: dictionary<values=int32, indices=int16, ordered=0>
```
The dictionary kernel matches these arguments during exact dispatch without
checking full type equality. This prevents expression binding from falling back
to best dispatch and inserting the necessary casts, although the kernel
requires identical types at execution.
The expected result is an `int32` array containing `[10, 20, 30, null,
null]`. Compatible mixed dictionary arguments should follow the existing
decoding and type-promotion path. Arguments with identical dictionary types
should retain dictionary-encoded execution.
### Component(s)
C++
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]