maryannxue commented on a change in pull request #23687: 
[SPARK-26708][SQL][followup] put the special handling of non-cascade uncache in 
the uncache method
URL: https://github.com/apache/spark/pull/23687#discussion_r252105791
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala
 ##########
 @@ -160,46 +160,35 @@ class CacheManager extends Logging {
     }
     // Re-compile dependent cached queries after removing the cached query.
     if (!cascade) {
-      recacheByCondition(spark, _.find(_.sameResult(plan)).isDefined, 
clearCache = false)
+      recacheByCondition(spark, cd => {
+        // If the cache buffer has already been loaded, we don't need to 
recompile the cached plan,
+        // as it does not rely on the plan that has been uncached anymore, it 
will just produce
+        // data from the cache buffer.
 
 Review comment:
   I think it might still be worth keeping the original comment starting from 
"Note that ...".

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