[
https://issues.apache.org/jira/browse/SPARK-18389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15652978#comment-15652978
]
Xiao Li commented on SPARK-18389:
---------------------------------
If we do not allow cyclic view reference, we need to detect it in {{CREATE
VIEW}} too. For example,
{code}
CREATE VIEW w AS WITH w AS (SELECT 1 AS n) SELECT n FROM w
{code}
Above is allowed in the current master branch. However, this is not allowed in
DB2. CTE name has to be different from the view name.
BTW, concurrency control is missing in our catalog support.
> Disallow cyclic view reference
> ------------------------------
>
> Key: SPARK-18389
> URL: https://issues.apache.org/jira/browse/SPARK-18389
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Reporter: Reynold Xin
>
> The following should not be allowed:
> {code}
> CREATE VIEW testView AS SELECT id FROM jt
> CREATE VIEW testView2 AS SELECT id FROM testView
> ALTER VIEW testView AS SELECT * FROM testView2
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]