zanmato1984 opened a new pull request, #55405: URL: https://github.com/apache/arrow/pull/55405
### Rationale for this change The `coalesce` dictionary kernel accepts arguments with different index types, value types, or ordered flags during exact dispatch. Expression binding therefore skips dictionary decoding and type promotion, and the bound expression fails with a `TypeError` at execution. ### What changes are included in this PR? Require full dictionary type equality using `AllTypesAreIdentical()`. Mixed dictionary arguments follow the existing best-dispatch and cast-insertion path, while identical dictionary types retain dictionary-encoded execution. ### Are these changes tested? Added exact/best-dispatch and expression binding/execution tests covering differences in index types, value types, and ordering, both argument orders, and variadic calls. Same-type inputs with different dictionary contents verify that dictionary-encoded execution is preserved. ### Are there any user-facing changes? Bound `coalesce` expressions with compatible mixed dictionary inputs now execute successfully, returning decoded values promoted to a common type where needed. ### Was AI used for this PR? AI generated the implementation, tests, and PR description. The author conducted a thorough review with AI assistance. **PR code and description written by:** - [ ] Human - [x] AI **Reviewed before submission by:** - [x] Human - [x] AI - [ ] Not reviewed -- 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]
