bvolpato commented on code in PR #4828:
URL: https://github.com/apache/calcite/pull/4828#discussion_r3712998293


##########
core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java:
##########
@@ -507,9 +507,13 @@ private boolean isCommaJoin(Join join) {
 
   /** Visits a Correlate; called by {@link #dispatch} via reflection. */
   public Result visit(Correlate e) {
+    final Set<String> usedNames = new HashSet<>(aliasSet);

Review Comment:
   fixed. We now visit the left input first, reserve `t`, and allocate the 
correlation alias from the shared alias set. This avoids collisions with input 
aliases and nested `VALUES ... AS t` relations.



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