You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/09 05:17:27 UTC
[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #4133: Use f64::total_cmp instead of OrderedFloat
tustvold commented on code in PR #4133:
URL: https://github.com/apache/arrow-datafusion/pull/4133#discussion_r1017438172
##########
datafusion/common/src/scalar.rs:
##########
@@ -221,17 +221,9 @@ impl PartialOrd for ScalarValue {
(Decimal128(_, _, _), _) => None,
(Boolean(v1), Boolean(v2)) => v1.partial_cmp(v2),
(Boolean(_), _) => None,
- (Float32(v1), Float32(v2)) => {
- let v1 = v1.map(OrderedFloat);
- let v2 = v2.map(OrderedFloat);
- v1.partial_cmp(&v2)
- }
+ (Float32(v1), Float32(v2)) => v1.partial_cmp(v2),
Review Comment:
```suggestion
(Float32(v1), Float32(v2)) => v1.total_cmp(v2),
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org