mihaibudiu commented on code in PR #5383:
URL: https://github.com/apache/calcite/pull/5383#discussion_r4476558077


##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -3644,10 +3678,11 @@ protected RelNode createAsofJoin(
           throw new AssertionError("Identifier '" + lookup.originalRelName
               + "." + originalFieldName + "' is not a group expr");
         }
-      }
+      } // end for correlName
 
-      requiredColumns.set(pos);
+      requiredColumns.set(pos - offset);

Review Comment:
   Turns out that `correlNames.size() == 1` does not hold as an assertion. 
DeduplicateCorrelateVariables renames duplicate variables; all variables must 
have the same type, given by the FROM list type; I will add an assertion 
enforcing this.



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