xiedeyantu commented on code in PR #4540:
URL: https://github.com/apache/calcite/pull/4540#discussion_r2384400354


##########
core/src/main/java/org/apache/calcite/rel/metadata/RelMdFunctionalDependency.java:
##########
@@ -20,33 +20,47 @@
 import org.apache.calcite.plan.RelOptUtil;
 import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.rel.core.Aggregate;
-import org.apache.calcite.rel.core.AggregateCall;
 import org.apache.calcite.rel.core.Calc;
 import org.apache.calcite.rel.core.Correlate;
+import org.apache.calcite.rel.core.Filter;
 import org.apache.calcite.rel.core.Join;
+import org.apache.calcite.rel.core.JoinRelType;
 import org.apache.calcite.rel.core.Project;
 import org.apache.calcite.rel.core.SetOp;
 import org.apache.calcite.rel.core.TableScan;
 import org.apache.calcite.rex.RexCall;
 import org.apache.calcite.rex.RexInputRef;
+import org.apache.calcite.rex.RexLiteral;
 import org.apache.calcite.rex.RexNode;
-import org.apache.calcite.rex.RexProgram;
 import org.apache.calcite.rex.RexUtil;
+import org.apache.calcite.sql.SqlKind;
 import org.apache.calcite.util.ImmutableBitSet;
+import org.apache.calcite.util.mapping.Mappings;
 
 import org.checkerframework.checker.nullness.qual.Nullable;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 /**
- * Default implementation of
- * {@link RelMetadataQuery#determines(RelNode, int, int)}
+ * Default implementation of {@link BuiltInMetadata.FunctionalDependency} 
metadata handler

Review Comment:
   The reason for implementing them together initially was that it was unclear 
which functionalities of functional dependencies would be utilized at the 
relational algebra plan level. If the functional dependency algorithm were 
implemented strictly according to theoretical axioms, both functionality and 
performance might be suboptimal. However, I now have a clearer understanding of 
the capabilities that the functional dependency part needs to provide. 
Therefore, if splitting is desired, now is a good time to do so. If not, 
changes can still be made collectively.



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