Dwrite commented on code in PR #5036:
URL: https://github.com/apache/calcite/pull/5036#discussion_r3467996079


##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -12324,4 +12324,29 @@ public Sql schema(CalciteAssert.SchemaSpec schemaSpec) 
{
     sql(query).withLibrary(SqlLibrary.HIVE).withHive().ok(expectedHive);
     sql(query).withLibrary(SqlLibrary.SPARK).withSpark().ok(expectedSpark);
   }
+
+  /** Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-7505";>[CALCITE-7505]
+   * RelToSqlConverter produces duplicate FROM aliases for correlated 
subqueries</a>. */
+  @Test void testExistsSubQueryAliasConflict() {

Review Comment:
   Thanks for pointing this out — I’ve updated the PR description. The previous 
wording was inaccurate: this change is not really about 
hasImplicitTableAlias(). The actual issue is that Filter did not preserve the 
correlation variables it binds, so RelToSqlConverter could not correctly 
determine the binding scope for correlated references.



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