You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2016/08/20 15:26:27 UTC
[GitHub] spark pull request #14727: [SPARK-17166] [SQL] Store Table Properties in CTA...
Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/14727#discussion_r75580329
--- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
@@ -653,6 +653,20 @@ class HiveDDLSuite
}
}
+ test("CTAS - converted to Data Source Table but lost table properties") {
+ withSQLConf(SQLConf.CONVERT_CTAS.key -> "true") {
+ withTable("t") {
+ sql("CREATE TABLE t TBLPROPERTIES('prop1' = 'c', 'prop2' = 'd') AS SELECT 1 as a, 1 as b")
+ val tableDesc = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
+ assert(tableDesc.properties.get("prop1").isEmpty)
+ assert(tableDesc.properties.get("prop2").isEmpty)
+ assert(tableDesc.storage.properties.get("prop1") == Option("c"))
+ assert(tableDesc.storage.properties.get("prop2") == Option("d"))
--- End diff --
is this what we want? Why do the table properties in Hive serde table should go to storage properties in data source table?
Ideally data source table should have data source options(storage properties) and table properties. Currently we don't support specifying table properties for data source tables, but it doesn't mean we will never do it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org