cloud-fan commented on a change in pull request #34754:
URL: https://github.com/apache/spark/pull/34754#discussion_r771059560
##########
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:
I think there is a bug here. Previously we pass `extraOptions.toMap` as
the write options, now we don't. @huaxingao can you help to fix it with a test
case? thanks!
--
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]