xuzifu666 commented on code in PR #5217:
URL: https://github.com/apache/calcite/pull/5217#discussion_r3849300843


##########
core/src/main/java/org/apache/calcite/sql/validate/JoinScope.java:
##########
@@ -90,10 +94,21 @@ && stripAs(join.getRight()) == ns.getNode()) {
       //
       // 'a' is a child namespace of 'a join b' and also of
       // 'a join b join c'.
-      usingScope.addChild(ns, alias, nullable);
+      //
+      // The enclosing scope sees this join's output, so it also sees the 
padding
+      // this join applies.
+      usingScope.addChild(ns, alias, nullable || registeringPaddedSide);
     }
   }
 
+  /**
+   * Tells this scope whether the side of the join being registered right now 
is
+   * the one this join pads with NULLs.
+   */
+  void setRegisteringNullPaddedSide(boolean nullable) {

Review Comment:
   Please also correct the Jira link in the PR description which should be 
CALCITE-7741.



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