You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2018/12/24 11:49:51 UTC

[GitHub] viirya opened a new pull request #23376: [SPARK-26435][SQL] Support creating partitioned table using Hive CTAS by specifying partition column names

viirya opened a new pull request #23376: [SPARK-26435][SQL] Support creating partitioned table using Hive CTAS by specifying partition column names
URL: https://github.com/apache/spark/pull/23376
 
 
   ## What changes were proposed in this pull request?
   
   Spark SQL doesn't support creating partitioned table using Hive CTAS in SQL syntax. However it is supported by using DataFrameWriter API.
   
   ```scala
   val df = Seq(("a", 1)).toDF("part", "id")
   df.write.format("hive").partitionBy("part").saveAsTable("t")
   ```
   Hive begins to support this syntax in newer version: https://issues.apache.org/jira/browse/HIVE-20241:
   
   ```
   CREATE TABLE t PARTITIONED BY (part) AS SELECT 1 as id, "a" as part
   ```
   
   This patch adds this support to SQL syntax.
   
   ## How was this patch tested?
   
   Added tests.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org