rdblue commented on a change in pull request #22193: [SPARK-25186][SQL] Remove 
v2 save mode.
URL: https://github.com/apache/spark/pull/22193#discussion_r251498149
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
 ##########
 @@ -143,14 +145,17 @@ object DataSourceV2Strategy extends Strategy {
         DataSourceV2ScanExec(
           r.output, r.source, r.options, r.pushedFilters, r.readSupport, 
scanConfig)) :: Nil
 
-    case WriteToDataSourceV2(writer, query) =>
-      WriteToDataSourceV2Exec(writer, planLater(query)) :: Nil
+    case WriteToDataSourceV2(writer, writeConfig, query) =>
+      WriteToDataSourceV2Exec(writer, writeConfig, planLater(query)) :: Nil
 
     case AppendData(r: DataSourceV2Relation, query, _) =>
-      WriteToDataSourceV2Exec(r.newWriteSupport(), planLater(query)) :: Nil
+      val writeSupport = r.newWriteSupport()
+      val writeConfig = writeSupport.createWriteConfig(
+        query.schema, new DataSourceOptions(r.options.asJava))
+      WriteToDataSourceV2Exec(r.newWriteSupport(), writeConfig, 
planLater(query)) :: Nil
 
 Review comment:
   Looks like an accident to me.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to