rahij opened a new pull request #25928: optimization: call fs.exists only when 
necessary
URL: https://github.com/apache/spark/pull/25928
 
 
   ### What changes were proposed in this pull request?
   
   Call fs.exists only when necessary in InsertIntoHadoopFsRelationCommand.
   
   ### Why are the changes needed?
   
   When saving a dataframe into Hadoop, spark first checks if the file exists 
before inspecting the SaveMode to determine if it should actually insert data. 
However, the pathExists variable is actually not used in the case of 
SaveMode.Append. In some file systems, the exists call can be expensive and 
hence this PR makes that call only when necessary.
   
   
   ### Does this PR introduce any user-facing change?
   No
   
   
   ### How was this patch tested?
   Existing unit tests should cover it since this doesn't change the behavior.
   

----------------------------------------------------------------
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]

Reply via email to