viirya opened a new issue, #5150: URL: https://github.com/apache/arrow-datafusion/issues/5150
**Describe the bug** We've integrated Datafusion but recently saw an exception during evaluating arithmetic operation between DictionaryArray and scalar value: ``` 'Dictionary(Int32, Int64) + Int64' can't be evaluated because there isn't a common type to coerce the types to. ``` A few issues around this: * `binary_operator_data_type` calls `coerce_types` to coerce left and right data types, but it doesn't consider `Dictionary` type. in `mathematics_numerical_coercion`. * In `BinaryExpr.evaluate_array_scalar`, the macros for arithmetic operations (`Plus` etc.) also don't consider `DictionaryArray`. **To Reproduce** Steps to reproduce the behavior: **Expected behavior** A clear and concise description of what you expected to happen. **Additional context** Add any other context about the problem here. -- 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]
