spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-16678) Disallow Creating a View when the same-name Table Exists
Date Fri, 22 Jul 2016 04:21:20 GMT

     [ 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


Mime
View raw message