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 2021/11/24 05:16:23 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #34060: [SPARK-36850][SQL] Migrate CreateTableStatement to v2 command framework

cloud-fan commented on a change in pull request #34060:
URL: https://github.com/apache/spark/pull/34060#discussion_r755707733



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -3469,9 +3469,14 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with SQLConfHelper with Logg
       case _ =>
         // Note: table schema includes both the table columns list and the partition columns
         // with data type.
+        val tableProperties = TableProperties(properties, provider, options, location, comment,
+          serdeInfo, external)
         val schema = StructType(columns ++ partCols)
-        CreateTableStatement(table, schema, partitioning, bucketSpec, properties, provider,
-          options, location, comment, serdeInfo, external = external, ifNotExists = ifNotExists)
+        CreateV2Table(

Review comment:
       The naming is a bit hard here. The best name should be `CreateTable`, but it's already taken. `CreateV2Table` is not proper here as this can also create v1 tables.
   
   Given that we can will migrate all the commands eventually, the existing `CreateTable` will be removed at the end. How about we still use the name `CreateTable` here? i.e. add a new `CreateTable` logical plan in `org.apache.spark.sql.catalyst.plans.logical`, which does not conflict with the existing `CreateTable`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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