Github user xuanyuanking commented on a diff in the pull request:
https://github.com/apache/spark/pull/19941#discussion_r157118985
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/InsertIntoDataSourceDirCommand.scala
---
@@ -67,8 +67,9 @@ case class InsertIntoDataSourceDirCommand(
val saveMode = if (overwrite) SaveMode.Overwrite else
SaveMode.ErrorIfExists
try {
-
sparkSession.sessionState.executePlan(dataSource.planForWriting(saveMode,
query))
- dataSource.writeAndRead(saveMode, query)
--- End diff --
Revert done.
Sorry, maybe I misunderstand your words of 'get rid of
dataSource.writeAndRead'. Like you and Wenchen's discussion in
https://github.com/apache/spark/pull/16481, shouldn't we make `writeAndRead`
just return a BaseRelation without write to the destination? Thank you for your
patient reply.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]