You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/12/12 05:29:50 UTC
[GitHub] [spark] viirya commented on a change in pull request #30742: [SPARK-33653][SQL] DSv2: REFRESH TABLE should recache the table itself
viirya commented on a change in pull request #30742:
URL: https://github.com/apache/spark/pull/30742#discussion_r541506696
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
##########
@@ -56,9 +56,19 @@ class DataSourceV2Strategy(session: SparkSession) extends Strategy with Predicat
session.sharedState.cacheManager.recacheByPlan(session, r)
}
- private def invalidateCache(r: ResolvedTable)(): Unit = {
+ private def invalidateCache(r: ResolvedTable, recacheTable: Boolean = false)(): Unit = {
val v2Relation = DataSourceV2Relation.create(r.table, Some(r.catalog), Some(r.identifier))
+ val cache = session.sharedState.cacheManager.lookupCachedData(v2Relation)
Review comment:
I think `cache` is only necessary in `if` block?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org