aokolnychyi commented on code in PR #56121:
URL: https://github.com/apache/spark/pull/56121#discussion_r3364232447
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala:
##########
@@ -291,15 +291,13 @@ class QueryExecution(
assertAnalyzed()
assertSupported()
- // During a transaction, skip cache substitution. This is to avoid
replacing relations
- // loaded by the transactional catalog with potentially stale relations
cached before
- // the transaction was active.
- if (transactionOpt.isDefined) {
- normalized
- } else {
- // Clone the plan to avoid sharing the plan instance between different
stages like
- // analyzing, optimizing and planning.
- sparkSession.sharedState.cacheManager.useCachedData(normalized.clone())
+ // Clone the plan to avoid sharing the plan instance between different
stages like
+ // analyzing, optimizing and planning.
+ val planToRewrite = normalized.clone()
+ val cacheManager = sparkSession.sharedState.cacheManager
+ transactionOpt match {
Review Comment:
This seems correct.
--
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]