comphead commented on code in PR #4133:
URL: https://github.com/apache/arrow-datafusion/pull/4133#discussion_r1018296999
##########
datafusion/common/src/scalar.rs:
##########
@@ -637,14 +643,8 @@ impl std::hash::Hash for ScalarValue {
s.hash(state)
}
Boolean(v) => v.hash(state),
- Float32(v) => {
- let v = v.map(OrderedFloat);
- v.hash(state)
- }
- Float64(v) => {
- let v = v.map(OrderedFloat);
- v.hash(state)
- }
+ Float32(v) => v.map(Fl).hash(state),
Review Comment:
v is `Option<f32>` is supports Hash, but we have to wrap f32 into some
wrapper supporting hash. `Fl` in this case, I didn't find how to implement
`Hash` directly on `f32/f64`
--
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]