Acfboy opened a new pull request, #20241:
URL: https://github.com/apache/datafusion/pull/20241

   ## Which issue does this PR close?
   N/A
   
   ## Rationale for this change
   In the original codebase, bitwise_coercion was implemented as follows:
   ```rust
   if left_type == right_type {
           return Some(left_type.clone());
   }
   ```
   
   This causes any identical types—such as floats—to pass the check during the 
logical planning stage. The error only surfaces much later when the arrow 
kernel attempts execution. This appears to be a minor oversight by the original 
author.
   
   ## What changes are included in this PR?
   
   ```diff
   - if left_type == right_type {
   + if left_type == right_type && left_type.is_integer() {
            return Some(left_type.clone());
    }
   ```
   
   
   ## Are these changes tested?
   
   Yes, a new unit test is added, and all existing tests passed.
   
   ## Are there any user-facing changes?
   No.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to