iwanttobepowerful commented on code in PR #4647:
URL: https://github.com/apache/calcite/pull/4647#discussion_r2550537333


##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -3453,7 +3453,8 @@ private Pair<RexNode, RelNode> convertOnCondition(
       SqlNode condition,
       RelNode leftRel,
       RelNode rightRel) {
-    bb.setRoot(ImmutableList.of(leftRel, rightRel));
+    bb.setRoot(ImmutableList.of(leftRel, rightRel), leftRel,

Review Comment:
   The inspiration is likely derived from the code below.
   ```java
       /**
        * Sets a new root relational expression, as the translation process
        * backs its way further up the tree.
        *
        * @param root New root relational expression
        * @param leaf Whether the relational expression is a leaf, that is,
        *             derived from an atomic relational expression such as a 
table
        *             name in the from clause, or the projection on top of a
        *             select-sub-query. In particular, relational expressions
        *             derived from JOIN operators are not leaves, but set
        *             expressions are.
        */
       public void setRoot(RelNode root, boolean leaf) {
         setRoot(
             Collections.singletonList(root), root, root instanceof 
LogicalJoin);
         if (leaf) {
           leaves.put(root, root.getRowType().getFieldCount());
         }
         this.columnMonotonicities.clear();
       }
   ```



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