Pajaraja commented on code in PR #50868:
URL: https://github.com/apache/spark/pull/50868#discussion_r2086831832


##########
sql/core/src/test/resources/sql-tests/inputs/cte-recursion.sql:
##########
@@ -57,6 +57,27 @@ SELECT * FROM t;
 
 DROP VIEW ZeroAndOne;
 
+-- unlimited recursion stopped from failing by putting LIMIT
+CREATE TEMPORARY VIEW ZeroAndOne(current, next) AS VALUES
+    (0,0),
+    (0,1),
+    (1,0),
+    (1,1);
+
+SET spark.sql.cteRecursionRowLimit=25;
+
+WITH RECURSIVE t(n) AS (
+    SELECT 1
+    UNION ALL
+    SELECT next FROM t LEFT JOIN ZeroAndOne ON n = current
+    )
+SELECT * FROM t LIMIT 30;
+
+SET spark.sql.cteRecursionRowLimit=1000000;

Review Comment:
   changed into RESET



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to