rubenada commented on code in PR #4575:
URL: https://github.com/apache/calcite/pull/4575#discussion_r2431871721
##########
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>
Review Comment:
thanks, could we have the example on this javadoc too? Something like
`{0, 1, 2} → {0, 1, 3, 4} should become {0, 1, 2} → {3, 4}`
--
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]