summaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/select_yql/with_cte_cycle.yql
blob: 9782c4f8bf1f305a6b84667ec10462dc7a912c0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
/* custom error: Too many CTE iterations: 500 */
/* TODO(YQL-20631): postgres can handle it */
PRAGMA YqlSelect = 'force';

WITH RECURSIVE cycle AS (
    SELECT CAST(1 AS Int32?) AS val
    UNION ALL
    SELECT (val + 1) % 3 AS val FROM cycle
)
SELECT * FROM cycle ORDER BY val;