houqp commented on a change in pull request #838:
URL: https://github.com/apache/arrow-datafusion/pull/838#discussion_r684813561



##########
File path: datafusion/src/scalar.rs
##########
@@ -156,6 +157,58 @@ impl PartialEq for ScalarValue {
     }
 }
 
+// manual implementation of `PartialOrd` that uses OrderedFloat to
+// get defined behavior for floating point
+impl PartialOrd for ScalarValue {
+    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+        use ScalarValue::*;
+        // This purposely doesn't have a catch-all "(_, _)" so that
+        // any newly added enum variant will require editing this list
+        // or else face a compile error

Review comment:
       this comment doesn't seem to hold true anymore in this function, would 
be better to keep the same structure in `PartialEq` so we can also avoid catch 
all match here.




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