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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]