tustvold commented on code in PR #4057:
URL: https://github.com/apache/arrow-datafusion/pull/4057#discussion_r1010954528


##########
datafusion/physical-expr/src/hash_utils.rs:
##########
@@ -68,15 +68,15 @@ hash_value!(i8, i16, i32, i64, i128, i256, u8, u16, u32, 
u64);
 hash_value!(bool, str, [u8]);
 
 macro_rules! hash_float_value {
-    ($($t:ty),+) => {
+    ($(($t:ty, $i:ty)),+) => {
         $(impl HashValue for $t {
             fn hash_one(&self, state: &RandomState) -> u64 {
-                state.hash_one(self.to_le_bytes())
+                state.hash_one(<$i>::from_ne_bytes(self.to_ne_bytes()))

Review Comment:
   This is a drive by fix that improves hashing performance of floating points. 
This is because there are specialized methods for hashing `i32`, `i64` as 
opposed to `[u8;N]`



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