hannerwang commented on a change in pull request #2454:
URL: https://github.com/apache/calcite/pull/2454#discussion_r805489082



##########
File path: core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
##########
@@ -4651,7 +4651,12 @@ public RexNode register(
               currentProjection);
         }
 
-        setRoot(newLeftInput, false);
+        // keep leaves property.
+        if (leaves.remove(root()) != null) {
+          setRoot(newLeftInput, true);
+        } else {
+          setRoot(newLeftInput, false);
+        }

Review comment:
       Good, Thanks asolimando!




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