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/12/03 03:39:57 UTC
[GitHub] [spark] Peng-Lei commented on a change in pull request #34764: [SPARK-37330][SQL] Migrate ReplaceTableStatement to v2 command
Peng-Lei commented on a change in pull request #34764:
URL: https://github.com/apache/spark/pull/34764#discussion_r761626380
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -3564,8 +3564,9 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with SQLConfHelper with Logg
// Note: table schema includes both the table columns list and the partition columns
// with data type.
val schema = StructType(columns ++ partCols)
- ReplaceTableStatement(table, schema, partitioning, bucketSpec, properties, provider,
- options, location, comment, serdeInfo, orCreate = orCreate)
+ ReplaceTable(
+ UnresolvedDBObjectName(table, isNamespace = false),
+ schema, partitioning, tableSpec.copy(external = external), orCreate = orCreate)
Review comment:
I also think `external` is outdated. Today Spark have no key word `EXTERNAL` for `CREATE/REPLACE TABLE`. We use `LOCATION` to diff the `external table` and `managed table` to unify the syntax for `create data souce table`. So maybe [#Line](https://github.com/apache/spark/blob/15d112262064f98312ddfd8421f01d7a5c8b783c/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L3525) need to be removed.
--
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