peter-toth commented on a change in pull request #23531: [SPARK-24497][SQL]
Support recursive SQL query
URL: https://github.com/apache/spark/pull/23531#discussion_r248279936
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -282,7 +282,7 @@ describeColName
;
ctes
- : WITH namedQuery (',' namedQuery)*
+ : WITH recursive=RECURSIVE? namedQuery (',' namedQuery)*
Review comment:
Some require some don't. I believe it is good idea to require `RECURSIVE` to
distinguish the case when we allow recursion.
In `cte.sql` we have this test:
```
create temporary view t as select * from values 0, 1, 2 as t(id);
...
-- WITH clause should reference the base table
WITH t AS (SELECT 1 FROM t) SELECT * FROM t;
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]