[SPARK-27062] CatalogImpl.refreshTable should recreate cache with received tableName.#23979
Closed
William1104 wants to merge 1 commit intoapache:branch-2.3from
Closed
[SPARK-27062] CatalogImpl.refreshTable should recreate cache with received tableName.#23979William1104 wants to merge 1 commit intoapache:branch-2.3from
William1104 wants to merge 1 commit intoapache:branch-2.3from
Conversation
…e. It aligns the behavior of cacheTable method
Contributor
Author
|
ok to test |
Contributor
Author
|
Jenkins, test this please |
Contributor
Author
|
Jenkins, add to whitelist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If CatalogImpl.refreshTable() method is invoked against a cached table, this method would first uncache corresponding query in the shared state cache manager, and then cache it back to refresh the cache copy.
However, the table was recached with only 'table name'. The database name will be missed. Therefore, if cached table is not on the default database, the recreated cache may refer to a different table. For example, we may see the cached table name in driver's storage page will be changed after table refreshing.
Actually, CatalogImpl registers cache with received table name. Therefore, I would like to propose aligning the behavior. RefreshTable method should reuse the received table name instead.
What changes were proposed in this pull request?
Align the behavior of CatalogImpl.cacheTable and CatalogImpl.refreshTable, such that they both register query with received tableName.
How was this patch tested?
It was tested with existing unit tests.
Please review http://spark.apache.org/contributing.html before opening a pull request.