You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/07/22 04:21:20 UTC

[jira] [Assigned] (SPARK-16678) Disallow Creating a View when the same-name Table Exists

     [ https://issues.apache.org/jira/browse/SPARK-16678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apache Spark reassigned SPARK-16678:
------------------------------------

    Assignee:     (was: Apache Spark)

> Disallow Creating a View when the same-name Table Exists
> --------------------------------------------------------
>
>                 Key: SPARK-16678
>                 URL: https://issues.apache.org/jira/browse/SPARK-16678
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Xiao Li
>
> When we create a view, we check whether the view already exists. In the current implementation, if a table with the same name exists, we treat it as a view. However, this is not the right behavior. We should follow what Hive does. For example,
> {noformat}
> hive> CREATE TABLE tab1 (id int);
> OK
> Time taken: 0.196 seconds
> hive> CREATE OR REPLACE VIEW tab1 AS SELECT * FROM t1;
> FAILED: SemanticException [Error 10218]: Existing table is not a view
>  The following is an existing table, not a view: default.tab1
> {noformat}



--
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