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


##########
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:
   The parameter name "nullable" is not ideal; I suggest changing it to 
something more meaningful, such as "nullPadded".



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