You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "vihangk1 (via GitHub)" <gi...@apache.org> on 2023/06/27 00:31:41 UTC

[GitHub] [spark] vihangk1 commented on a diff in pull request #41749: [SPARK-44199] CacheManager refreshes the fileIndex unnecessarily

vihangk1 commented on code in PR #41749:
URL: https://github.com/apache/spark/pull/41749#discussion_r1242988181


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala:
##########
@@ -366,14 +366,25 @@ class CacheManager extends Logging with AdaptiveSparkPlanHelper {
       fileIndex: FileIndex,
       fs: FileSystem,
       qualifiedPath: Path): Boolean = {
-    val prefixToInvalidate = qualifiedPath.toString
     val needToRefresh = fileIndex.rootPaths
-      .map(_.makeQualified(fs.getUri, fs.getWorkingDirectory).toString)
-      .exists(_.startsWith(prefixToInvalidate))

Review Comment:
    I am not sure I understand. Can you give more details on the example above? I the `mytable/col=A` gets updated, why would a rootPath which is not a subdirectory of `mytable/col=A` need to be refreshed?



-- 
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: reviews-unsubscribe@spark.apache.org

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