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