Dandandan commented on code in PR #4057:
URL: https://github.com/apache/arrow-datafusion/pull/4057#discussion_r1011314836
##########
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:
Looking at this now, are we correctly handling NaNs here?
Looking at the ordered-float implementation for `Hash`, it first normalizes
nans https://docs.rs/ordered-float/3.3.0/src/ordered_float/lib.rs.html#160
--
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]