amaliujia commented on code in PR #41777:
URL: https://github.com/apache/spark/pull/41777#discussion_r1246023516
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala:
##########
@@ -253,7 +253,9 @@ class CacheManager extends Logging with
AdaptiveSparkPlanHelper {
* Tries to re-cache all the cache entries that refer to the given plan.
*/
def recacheByPlan(spark: SparkSession, plan: LogicalPlan): Unit = {
- recacheByCondition(spark, _.plan.exists(_.sameResult(plan)))
+ if
(spark.sessionState.conf.getConf(SQLConf.QUERY_RESULT_CACHE_AUTO_REFRESH)) {
Review Comment:
BTW I guess in this case the better API design is actually more needed than
others.
This is because `cache()` + `SQLConf` becomes the complete API surface for
users in this case while maybe a simple `.cache(autoRefresh: Boolean)` makes
more sense.
We could leave this for future exploration.
--
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]