Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/13756#discussion_r68181428 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala --- @@ -206,7 +206,22 @@ private[sql] case class PreWriteCheck(conf: SQLConf, catalog: SessionCatalog) // The relation in l is not an InsertableRelation. failAnalysis(s"$l does not allow insertion.") + case c: CreateTableUsing => --- End diff -- Only found one case: `CREATE TABLE` with `PARTITION BY`. Let me explain what I found. First, `CREATE TABLE` command does not support `bucketSpec`. See [code](https://github.com/gatorsmile/spark/blob/24edb5f60f3caf79c6e860905041cd09301589db/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala#L901-L903) Second, `CREATE TABLE AS SELECT` that can generate `CreateHiveTableAsSelectLogicalPlan` [does not allow users to specify the schema](https://github.com/gatorsmile/spark/blob/24edb5f60f3caf79c6e860905041cd09301589db/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala#L984-L989), which includes partitionBy columns. Let me know if anything is still missing. Thanks!
--- 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