-
- Downloads
[SPARK-19765][SPARK-18549][SQL] UNCACHE TABLE should un-cache all cached plans...
[SPARK-19765][SPARK-18549][SQL] UNCACHE TABLE should un-cache all cached plans that refer to this table ## What changes were proposed in this pull request? When un-cache a table, we should not only remove the cache entry for this table, but also un-cache any other cached plans that refer to this table. This PR also includes some refactors: 1. use `java.util.LinkedList` to store the cache entries, so that it's safer to remove elements while iterating 2. rename `invalidateCache` to `recacheByPlan`, which is more obvious about what it does. ## How was this patch tested? new regression test Author: Wenchen Fan <wenchen@databricks.com> Closes #17097 from cloud-fan/cache.
Showing
- sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala 66 additions, 52 deletions...n/scala/org/apache/spark/sql/execution/CacheManager.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala 0 additions, 6 deletions...pache/spark/sql/execution/columnar/InMemoryRelation.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala 1 addition, 2 deletions...in/scala/org/apache/spark/sql/execution/command/ddl.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoDataSourceCommand.scala 3 additions, 2 deletions...l/execution/datasources/InsertIntoDataSourceCommand.scala
- sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala 9 additions, 14 deletions...ain/scala/org/apache/spark/sql/internal/CatalogImpl.scala
- sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala 35 additions, 15 deletions...rc/test/scala/org/apache/spark/sql/CachedTableSuite.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala 2 additions, 2 deletions...apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/CachedTableSuite.scala 2 additions, 4 deletions...st/scala/org/apache/spark/sql/hive/CachedTableSuite.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/parquetSuites.scala 1 addition, 1 deletion.../test/scala/org/apache/spark/sql/hive/parquetSuites.scala
Loading
Please register or sign in to comment