rubenada commented on code in PR #3480:
URL: https://github.com/apache/calcite/pull/3480#discussion_r1371284083
##########
core/src/test/java/org/apache/calcite/test/enumerable/EnumerableRepeatUnionTest.java:
##########
@@ -70,6 +81,47 @@ class EnumerableRepeatUnionTest {
.returnsOrdered("i=1", "i=2", "i=3", "i=4", "i=5", "i=6", "i=7",
"i=8", "i=9", "i=10");
}
+ @Test void testGenerateNumbers2UsingSql() {
+ CalciteAssert.that()
+ .query("WITH RECURSIVE aux(i) AS (\n"
+ + " VALUES (0)"
+ + " UNION "
+ + " SELECT MOD((i+1), 10) FROM aux WHERE i < 10"
+ + " )"
+ + " SELECT * FROM aux\n")
+ .returnsOrdered("I=0", "I=1", "I=2", "I=3", "I=4", "I=5", "I=6",
"I=7", "I=8", "I=9");
+ }
+
+ @Test void testGenerateNumbers2UsingSqlCheckPlan() {
+ CalciteAssert.that()
+ .with(CalciteConnectionProperty.LEX, Lex.JAVA)
+ .with(CalciteConnectionProperty.FORCE_DECORRELATE, false)
+ .withSchema("s", new ReflectiveSchema(new HierarchySchema()))
+ .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner -> {
Review Comment:
Do we really need the Hook.PLANNER for this test? It adds/removes
join-related rules, but the query does not have any join....
--
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]