You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2016/09/01 03:26:22 UTC

[jira] [Updated] (SPARK-16942) CREATE TABLE LIKE generates External table when source table is an External Hive Serde table

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

Xiao Li updated SPARK-16942:
----------------------------
    Description: 
When the table type of source table is an EXTERNAL Hive serde table, {{CREATE TABLE LIKE}} will generate an EXTERNAL table. The expected table type should be MANAGED

The table type of the generated table is `EXTERNAL` when the source table is an external Hive Serde table. Currently, we explicitly set it to `MANAGED`, but Hive is checking the table property `EXTERNAL` to decide whether the table is `EXTERNAL` or not. (See https://github.com/apache/hive/blob/master/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java#L1407-L1408) Thus, the created table is still `EXTERNAL`. 


  was:When the table type of source table is an EXTERNAL Hive serde table, {{CREATE TABLE LIKE}} will generate an EXTERNAL table. The expected table type should be MANAGED


> CREATE TABLE LIKE generates External table when source table is an External Hive Serde table
> --------------------------------------------------------------------------------------------
>
>                 Key: SPARK-16942
>                 URL: https://issues.apache.org/jira/browse/SPARK-16942
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Xiao Li
>
> When the table type of source table is an EXTERNAL Hive serde table, {{CREATE TABLE LIKE}} will generate an EXTERNAL table. The expected table type should be MANAGED
> The table type of the generated table is `EXTERNAL` when the source table is an external Hive Serde table. Currently, we explicitly set it to `MANAGED`, but Hive is checking the table property `EXTERNAL` to decide whether the table is `EXTERNAL` or not. (See https://github.com/apache/hive/blob/master/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java#L1407-L1408) Thus, the created table is still `EXTERNAL`. 



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