niebayes commented on code in PR #14060:
URL: https://github.com/apache/datafusion/pull/14060#discussion_r1909076566


##########
datafusion/physical-expr-common/src/physical_expr.rs:
##########
@@ -159,9 +159,7 @@ pub trait DynEq {
 
 impl<T: Eq + Any> DynEq for T {
     fn dyn_eq(&self, other: &dyn Any) -> bool {
-        other
-            .downcast_ref::<Self>()
-            .map_or(false, |other| other == self)
+        other.downcast_ref::<Self>() == Some(self)

Review Comment:
   fix clippy



##########
datafusion/physical-expr-common/src/sort_expr.rs:
##########
@@ -291,9 +291,9 @@ impl PhysicalSortRequirement {
     /// Returns whether this requirement is equal or more specific than 
`other`.
     pub fn compatible(&self, other: &PhysicalSortRequirement) -> bool {
         self.expr.eq(&other.expr)
-            && other.options.map_or(true, |other_opts| {
-                self.options.map_or(false, |opts| opts == other_opts)
-            })
+            && other
+                .options
+                .map_or(true, |other_opts| self.options == Some(other_opts))

Review Comment:
   fix clippy



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