gianm commented on code in PR #5368:
URL: https://github.com/apache/calcite/pull/5368#discussion_r4418578509


##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -2028,8 +2027,10 @@ private static boolean isWidening(RelDataType type, 
RelDataType type1) {
     final RelNode oldLeft = rel.getInput(0);
     final RelNode oldRight = rel.getInput(1);
 
-    final Frame leftFrame = getInvoke(oldLeft, isCorVarDefined, rel, 
parentPropagatesNullValues);
-    final Frame rightFrame = getInvoke(oldRight, isCorVarDefined, rel, 
parentPropagatesNullValues);
+    final Frame leftFrame =

Review Comment:
   Added a comment explaining why the flags are set:
   
   ```
       // Decorrelate recursively. Setting parentPropagatesNullValues lets a 
scalar aggregate return
       // no row for a corVar value, rather than a row of NULLs. That is safe 
only for the side of a
       // LEFT or RIGHT join that generates NULL values, since the join then 
supplies those NULLs.
       // FULL does not qualify, because it must output the aggregate's row 
even when it has no match.
   ```
   



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