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


##########
core/src/main/java/org/apache/calcite/util/ArrowSet.java:
##########
@@ -336,4 +337,68 @@ public ArrowSet build() {
       return new ArrowSet(arrowSet);
     }
   }
+
+  /**
+   * Computes a minimal ArrowSet by removing obvious redundant Arrow.
+   *
+   * <p>This method removes two obvious types of redundancy:
+   * <ul>
+   *   <li>Right-side consolidation: If {0} → {1} and {0} → {2}, merge to {0} 
→ {1, 2}</li>
+   *   <li>Left-side redundancy: If {0} → {1} exists, then {0, 2} → {1} is 
redundant</li>
+   *   <li>Trivial dependencies: Remove dependents that are already in 
determinants</li>
+   * </ul>
+   */
+  private static Set<Arrow> computeMinimalDependencySet(Set<Arrow> arrows) {

Review Comment:
   Could someone please review this PR? The implementation in this PR addresses 
the elimination of three varieties of redundant functional dependencies. 
Although a complete computation of the exact minimal set is not achieved, the 
solution represents a balanced approach considering practical constraints and 
usefulness.



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