Skip to content

[SPARK-27062] CatalogImpl.refreshTable should recreate cache with received tableName.#23979

Closed
William1104 wants to merge 1 commit intoapache:branch-2.3from
William1104:branch-2.3
Closed

[SPARK-27062] CatalogImpl.refreshTable should recreate cache with received tableName.#23979
William1104 wants to merge 1 commit intoapache:branch-2.3from
William1104:branch-2.3

Conversation

@William1104
Copy link
Contributor

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.

…e. It aligns the behavior of cacheTable method
@William1104
Copy link
Contributor Author

ok to test

@William1104
Copy link
Contributor Author

Jenkins, test this please

@William1104
Copy link
Contributor Author

Jenkins, add to whitelist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant