Skip to content
Snippets Groups Projects
Commit c05baabf authored by Wenchen Fan's avatar Wenchen Fan Committed by Xiao Li
Browse files

[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.
parent 030acdd1
No related branches found
No related tags found
No related merge requests found
Showing
with 119 additions and 98 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment