viirya opened a new issue, #5464:
URL: https://github.com/apache/arrow-datafusion/issues/5464

   **Describe the bug**
   
   Comparing decimal dictionary array with scalar value causes an error like:
   
   ```
   thread 
'expressions::binary::tests::comparison_dict_decimal_scalar_expr_test' panicked 
at 'called `Result::unwrap()` on an `Err` value: Internal("could not cast value 
to 
arrow_array::array::primitive_array::PrimitiveArray<arrow_array::types::Decimal128Type>")',
 datafusion/physical-expr/src/expressions/binary.rs:1085:17                     
                                                                                
                           
   ```
   
   In `compute_decimal_op_dyn_scalar` macro, we shouldn't cast lhs array to 
decimal array as it invokes dyn kernel and lhs array could be dictionary array.
   
   **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]

Reply via email to