michaelbraun commented on code in PR #5272:
URL: https://github.com/apache/calcite/pull/5272#discussion_r4042947293


##########
core/src/main/java/org/apache/calcite/plan/hep/HepPlanner.java:
##########
@@ -749,9 +762,19 @@ private static boolean matchOperands(
       RelNode rel,
       List<RelNode> bindings,
       Map<RelNode, List<RelNode>> nodeChildren) {
-    if (!operand.matches(rel)) {
-      return false;
-    }
+    return operand.matches(rel)
+        && matchOperandsWithOperandMatched(operand, rel, bindings, 
nodeChildren);
+  }
+
+  /**
+   * Matches the children of {@code rel} against those of {@code operand}, for 
a {@code rel}
+   * that {@code operand} is already known to match.
+   */
+  private static boolean matchOperandsWithOperandMatched(

Review Comment:
   I don't like the name of this method, could use help here 



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