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

   ## Which issue does this PR close?
   
   - Followup to #18225 and PR #18322
   
   ## Rationale for this change
   
   Spark's `bit_count` function always operators on 64-bit values, while the 
original `bit_count` implementation in `datafusion_spark` operated on the 
native size of the input value.
   In order to fix this a custom bit counting implementation was ported over 
from the Java Spark implementation. This isn't really necessary though. 
Widening signed integers to `i64` and then using `i64::count_ones` will get you 
the exact same result and is less obscure.
   
   ## What changes are included in this PR?
   
   Remove custom `bitcount` logic and use `i64::count_ones` instead.
   
   ## Are these changes tested?
   
   Covered by existing tests that were added for #18225
   
   ## 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