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


##########
datafusion/physical-expr/src/equivalence/class.rs:
##########
@@ -422,6 +423,32 @@ impl EquivalenceGroup {
         self.bridge_classes()
     }
 
+    #[allow(clippy::type_complexity)]
+    fn adjacent_set(&self) -> HashSet<(&Arc<dyn PhysicalExpr>, &Arc<dyn 
PhysicalExpr>)> {

Review Comment:
   Can we please add documentation to these functions about what they do and 
what the returned structure represents?



##########
datafusion/physical-expr/src/equivalence/class.rs:
##########
@@ -422,6 +423,32 @@ impl EquivalenceGroup {
         self.bridge_classes()
     }
 
+    #[allow(clippy::type_complexity)]
+    fn adjacent_set(&self) -> HashSet<(&Arc<dyn PhysicalExpr>, &Arc<dyn 
PhysicalExpr>)> {
+        let mut set = HashSet::new();
+        for cls in self.classes.iter() {
+            let exprs = cls.exprs.as_slice();
+            for i in 0..exprs.len() {
+                for j in i + 1..exprs.len() {
+                    set.insert((&exprs[i], &exprs[j]));
+                    set.insert((&exprs[j], &exprs[i]));
+                }
+            }
+        }
+        set
+    }
+
+    pub fn intersect(&self, other: &Self) -> Self {

Review Comment:
   Likewise here, can we please add documentation



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