Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19941#discussion_r156473299
  
    --- 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 --
    
    How about changing it to
    ```Scala
          
sparkSession.sessionState.executePlan(dataSource.planForWriting(saveMode, 
query)).toRdd
    ```


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to