Github user tejasapatil commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13395#discussion_r65013342
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala ---
    @@ -936,7 +936,47 @@ class SparkSqlAstBuilder(conf: SQLConf) extends 
AstBuilder {
           comment = comment)
     
         selectQuery match {
    -      case Some(q) => CreateTableAsSelectLogicalPlan(tableDesc, q, 
ifNotExists)
    +      case Some(q) =>
    +        // Hive does not allow to use a CTAS statement to create a 
partitioned table.
    +        if (tableDesc.partitionColumnNames.nonEmpty) {
    +          val errorMessage = "A Create Table As Select (CTAS) statement is 
not allowed to " +
    --- End diff --
    
    nit: `CREATE TABLE ... AS SELECT ` to be consistent with other places.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to