-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-22178] [SQL] Refresh Persistent Views by REFRESH TABLE Command #19405
Conversation
Test build #82365 has finished for PR 19405 at commit
|
cc @cloud-fan |
// Non-temp tables: refresh the metadata cache. | ||
sessionCatalog.refreshTable(tableIdent) | ||
|
||
val tableMetadata = sessionCatalog.getTempViewOrPermanentTableMetadata(tableIdent) | ||
// If this table is cached as an InMemoryRelation, drop the original |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should be moved to line 491.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
checkRefreshView(isTemp = true) | ||
} | ||
|
||
test("view refresh") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't cover the persistent view case for refresh, that's why the bug happens...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We need to ask contributors for adding more test cases when reviewing the PR.
LGTM except for one minor comment. |
Test build #82425 has finished for PR 19405 at commit
|
Thanks! Merged to master/2.2 |
## What changes were proposed in this pull request? The underlying tables of persistent views are not refreshed when users issue the REFRESH TABLE command against the persistent views. ## How was this patch tested? Added a test case Author: gatorsmile <gatorsmile@gmail.com> Closes #19405 from gatorsmile/refreshView. (cherry picked from commit e65b6b7) Signed-off-by: gatorsmile <gatorsmile@gmail.com>
## What changes were proposed in this pull request? The underlying tables of persistent views are not refreshed when users issue the REFRESH TABLE command against the persistent views. ## How was this patch tested? Added a test case Author: gatorsmile <gatorsmile@gmail.com> Closes apache#19405 from gatorsmile/refreshView. (cherry picked from commit e65b6b7) Signed-off-by: gatorsmile <gatorsmile@gmail.com>
What changes were proposed in this pull request?
The underlying tables of persistent views are not refreshed when users issue the REFRESH TABLE command against the persistent views.
How was this patch tested?
Added a test case