huaxingao commented on a change in pull request #34754:
URL: https://github.com/apache/spark/pull/34754#discussion_r771152985
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
##########
@@ -586,19 +586,22 @@ final class DataFrameWriter[T] private[sql](ds:
Dataset[T]) {
AppendData.byName(v2Relation, df.logicalPlan, extraOptions.toMap)
case (SaveMode.Overwrite, _) =>
- ReplaceTableAsSelectStatement(
- nameParts,
- df.queryExecution.analyzed,
+ val tableSpec = TableSpec(
+ bucketSpec = None,
+ properties = Map.empty,
+ provider = Some(source),
+ options = Map.empty,
+ location = extraOptions.get("path"),
+ comment = extraOptions.get(TableCatalog.PROP_COMMENT),
+ serde = None,
+ external = false)
+ ReplaceTableAsSelect(
+ UnresolvedDBObjectName(nameParts, isNamespace = false),
partitioningAsV2,
- None,
- Map.empty,
- Some(source),
- Map.empty,
- extraOptions.get("path"),
- extraOptions.get(TableCatalog.PROP_COMMENT),
- extraOptions.toMap,
- None,
- orCreate = true) // Create the table if it doesn't exist
+ df.queryExecution.analyzed,
+ tableSpec,
+ writeOptions = Map.empty,
Review comment:
Sorry for the bug. Will fix.
--
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]