alamb commented on code in PR #17182:
URL: https://github.com/apache/datafusion/pull/17182#discussion_r2282993023


##########
datafusion/expr/src/udf.rs:
##########
@@ -67,14 +67,31 @@ impl PartialEq for ScalarUDF {
     }
 }
 
-// TODO (https://github.com/apache/datafusion/issues/17064) PartialOrd is not 
consistent with PartialEq for `ScalarUDF` and it should be
-// Manual implementation based on `ScalarUDFImpl::equals`
 impl PartialOrd for ScalarUDF {
     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-        match self.name().partial_cmp(other.name()) {
-            Some(Ordering::Equal) => 
self.signature().partial_cmp(other.signature()),
-            cmp => cmp,
+        let mut cmp = self.name().cmp(other.name());
+        if cmp == Ordering::Equal {
+            cmp = self.signature().partial_cmp(other.signature())?;
         }

Review Comment:
   No, I think the debug assert is good. Sorry for not being clear



-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to