vldpyatkov commented on code in PR #13559:
URL: https://github.com/apache/ignite/pull/13559#discussion_r3959078521
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/RecursiveCteIntegrationTest.java:
##########
@@ -115,6 +115,88 @@ public void testRecursiveTermWithMultipleSelfReferences() {
.check();
}
+ /** */
+ @Test
+ public void testRecursiveCteWithMultipleJoinConsumers() {
+ assertQuery("WITH RECURSIVE numbers(n) AS (" +
+ "SELECT 1 " +
+ "UNION ALL " +
+ "SELECT n + 1 FROM numbers WHERE n < 3" +
+ ") " +
+ "SELECT l.n, r.n " +
+ "FROM numbers l " +
+ "JOIN numbers r ON l.n = r.n")
Review Comment:
I don’t use .ordered() in these tests, so the result order is not checked.
QueryChecker automatically sorts both the actual and expected results before
comparing them.
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/RecursiveCteIntegrationTest.java:
##########
@@ -178,6 +260,28 @@ public void
testStateIsIsolatedBetweenSameNamedRecursiveCtes() {
.check();
}
+ /** */
+ @Test
+ public void testNestedRecursiveCteStatesAreIsolated() {
+ assertQuery("WITH RECURSIVE first_numbers(n) AS (" +
+ "SELECT 10 " +
+ "UNION ALL " +
+ "SELECT n + 1 FROM first_numbers WHERE n < 12" +
+ "), second_numbers(n) AS (" +
+ "SELECT 1 " +
+ "UNION ALL " +
+ "SELECT second_numbers.n + 1 " +
+ "FROM second_numbers " +
+ "JOIN first_numbers ON second_numbers.n + 9 = first_numbers.n
" +
+ "WHERE second_numbers.n < 3" +
+ ") " +
+ "SELECT n FROM second_numbers")
Review Comment:
The same as above.
--
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]