Liang-Chi Hsieh created SPARK-26435:
---------------------------------------
Summary: Support creating partitioned table using Hive CTAS by
specifying partition column names
Key: SPARK-26435
URL: https://issues.apache.org/jira/browse/SPARK-26435
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 3.0.0
Reporter: Liang-Chi Hsieh
Spark SQL doesn't support creating partitioned table using Hive CTAS in SQL
syntax. However it is supported by using DataFrameWriter API.
{code}
val df = Seq(("a", 1)).toDF("part", "id")
df.write.format("hive").partitionBy("part").saveAsTable("t")
{code}
Hive begins to support this in newer version:
https://issues.apache.org/jira/browse/HIVE-20241:
{code}
CREATE TABLE t PARTITIONED BY (part) AS SELECT 1 as id, "a" as part
{code}
To match DataFrameWriter API, we should this support to SQL syntax.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]