bvolpato-dd commented on code in PR #4828:
URL: https://github.com/apache/calcite/pull/4828#discussion_r2940922566
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -11887,6 +11887,39 @@ public Sql schema(CalciteAssert.SchemaSpec schemaSpec)
{
sql(sql).schema(CalciteAssert.SchemaSpec.JDBC_SCOTT).ok(expected);
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7440">[CALCITE-7440]
+ * RelToSqlConverter throws NPE when correlation scope is missing after
+ * semi-join rewrites.</a>. */
+ @Test void testPostgresqlRoundTripCorrelatedProjectWithSemiJoinRules() {
Review Comment:
You were right. The plain round-trip test passed on main, so it was not
validating the bug.
I removed that test and kept only the semi-join rewrite reproducer.
I also re-ran the retained test against main locally by copying it into a
detached main worktree. It fails there with `NullPointerException: variable
$cor1 is not found`, and it passes on this branch.
--
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]