mihaibudiu commented on code in PR #3480:
URL: https://github.com/apache/calcite/pull/3480#discussion_r1370476759


##########
core/src/test/java/org/apache/calcite/test/enumerable/EnumerableRepeatUnionTest.java:
##########
@@ -45,6 +45,17 @@
  */
 class EnumerableRepeatUnionTest {
 
+  @Test void testGenerateNumbersUsingSql() {
+    CalciteAssert.that()
+        .query("WITH RECURSIVE delta(n) AS (\n"
+            + "  VALUES (1)\n"
+            + " UNION ALL\n"

Review Comment:
   The `WHERE` breaks the growth in the value of n, but UNION would break the 
growth in cardinality. 
   UNION ALL should produce a multiset, so you should get the following values 
in `delta` in successive iterations: [1], [1, 2], [1, 2, 2, 3], [1, 2, 2, 2, 3, 
3, 4] etc in your relation in successive iterations. I understand how this 
should work with `UNION`, but not with `UNION ALL`. Why is delta a set and not 
a multiset?
   



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