cloud-fan commented on code in PR #53202:
URL: https://github.com/apache/spark/pull/53202#discussion_r2558792596


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/WriteToDataSourceV2Exec.scala:
##########
@@ -171,7 +172,11 @@ case class ReplaceTableAsSelectExec(
     //
     // RTAS must refresh and pin versions in query to read from original table 
versions instead of
     // newly created empty table that is meant to serve as target for 
append/overwrite
-    val refreshedQuery = V2TableRefreshUtil.refresh(session, query, 
versionedOnly = true)
+    val refreshedQuery = V2TableRefreshUtil.refresh(

Review Comment:
   ok I think I got it. We do refresh once in `QueryExecution`, and we do 
refresh again here during execution. I think this is not needed, as for command 
execution, the analysis and execution always happen back to back, as Spark 
eagerly executes commands. We can just pin versions here.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to