NobiGo commented on code in PR #4713:
URL: https://github.com/apache/calcite/pull/4713#discussion_r2654660596


##########
core/src/main/java/org/apache/calcite/sql/validate/SelectScope.java:
##########
@@ -222,4 +222,15 @@ public boolean existingWindowName(String winName) {
   public void setExpandedSelectList(@Nullable List<SqlNode> selectList) {
     expandedSelectList = selectList;
   }
+
+  @Override public boolean isWithin(SqlValidatorScope scope2) {
+    if (this == scope2) {
+      return true;
+    }
+    // go from the JOIN to the enclosing SELECT
+    if (scope2 instanceof JoinScope) {

Review Comment:
   According to the test cases, yes. This method corresponds to the `isWithin` 
method in `JoinScope`.



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