snuyanzin commented on code in PR #5231:
URL: https://github.com/apache/calcite/pull/5231#discussion_r3887659813
##########
core/src/test/java/org/apache/calcite/sql2rel/RelDecorrelatorTest.java:
##########
@@ -2548,4 +2548,43 @@ private RelNode decorrelateSql(String sql) {
+ " LogicalTableScan(table=[[bookstore, authors]])\n";
assertThat(after, hasTree(planAfter));
}
+
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7753">[CALCITE-7753]
+ * CorrelateProjectExtractor corrupts plans with nested Correlates that reuse
+ * the same correlation id</a>. */
+ @Test void testNestedCorrelatesSharingCorrelationId() {
Review Comment:
Because the bug requires two nested Correlates that share the same
correlation id, and pure SQL (in Calcite) never produces that shape: Calcite's
SqlToRelConverter gives every correlated subquery scope its own id.
--
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]