cloud-fan commented on a change in 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#discussion_r243872372
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala
 ##########
 @@ -1196,13 +1196,16 @@ class SparkSqlAstBuilder(conf: SQLConf) extends 
AstBuilder(conf) {
 
     selectQuery match {
       case Some(q) =>
-        // Hive does not allow to use a CTAS statement to create a partitioned 
table.
+        // Hive does not allow to use a CTAS statement to create a partitioned 
table
+        // by specifying table schema.
         if (tableDesc.partitionColumnNames.nonEmpty) {
           val errorMessage = "A Create Table As Select (CTAS) statement is not 
allowed to " +
-            "create a partitioned table using Hive's file formats. " +
+            "create a partitioned table using Hive's file formats by 
specifying table schema. " +
             "Please use the syntax of \"CREATE TABLE tableName USING 
dataSource " +
             "OPTIONS (...) PARTITIONED BY ...\" to create a partitioned table 
through a " +
-            "CTAS statement."
+            "CTAS statement. Since Spark 3.0, you can specify partition column 
names " +
 
 Review comment:
   we don't need to put spark version in error message. Users can only see this 
message when they use Spark 3.0.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to