You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Reynold Xin (JIRA)" <ji...@apache.org> on 2016/11/09 19:51:58 UTC

[jira] [Comment Edited] (SPARK-18389) Disallow cyclic view reference

    [ https://issues.apache.org/jira/browse/SPARK-18389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15651873#comment-15651873 ] 

Reynold Xin edited comment on SPARK-18389 at 11/9/16 7:51 PM:
--------------------------------------------------------------

It'd make more sense to do this check during the command execution so we fail early.

We can do the full expansion in the analyzer. Doing full expansion in analyzer doesn't mean we need to use the fully expanded plan to generate the SQL for the view.


was (Author: rxin):
It'd make more sense to do this check during the command execution so we fail early.

We can do the full expansion in the analyzer.


> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org