rdblue commented on a change in pull request #25876: [SPARK-29197][SQL] Remove
saveModeForDSV2 from DataFrameWriter
URL: https://github.com/apache/spark/pull/25876#discussion_r328275783
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
##########
@@ -380,8 +380,8 @@ final class DataFrameWriter[T] private[sql](ds:
Dataset[T]) {
DataSourceV2Relation.create(t)
}
- val command = modeForDSV2 match {
- case SaveMode.Append =>
+ val command = mode match {
+ case SaveMode.Append | SaveMode.ErrorIfExists | SaveMode.Ignore =>
Review comment:
Looks like the previous version used this:
```
InsertIntoTable(
table = UnresolvedRelation(tableIdent),
partition = Map.empty[String, Option[String]],
query = df.logicalPlan,
overwrite = mode == SaveMode.Overwrite, // << Either overwrite or
append
ifPartitionNotExists = false)
```
So I agree that this is using the same behavior that v1 did.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]