Skip to content

Conversation

@gatorsmile
Copy link
Member

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

@SparkQA
Copy link

SparkQA commented Oct 1, 2017

Test build #82365 has finished for PR 19405 at commit 6650fcf.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member Author

cc @cloud-fan

sessionCatalog.refreshTable(tableIdent)

val tableMetadata = sessionCatalog.getTempViewOrPermanentTableMetadata(tableIdent)
// If this table is cached as an InMemoryRelation, drop the original
Copy link
Member

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.

Copy link
Contributor

@jiangxb1987 jiangxb1987 left a 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") {
Copy link
Contributor

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...

Copy link
Member Author

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.

@viirya
Copy link
Member

viirya commented Oct 3, 2017

LGTM except for one minor comment.

@SparkQA
Copy link

SparkQA commented Oct 3, 2017

Test build #82425 has finished for PR 19405 at commit d677c77.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member Author

Thanks! Merged to master/2.2

asfgit pushed a commit that referenced this pull request Oct 3, 2017
## 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 <[email protected]>

Closes #19405 from gatorsmile/refreshView.

(cherry picked from commit e65b6b7)
Signed-off-by: gatorsmile <[email protected]>
@asfgit asfgit closed this in e65b6b7 Oct 3, 2017
MatthewRBruce pushed a commit to Shopify/spark that referenced this pull request Jul 31, 2018
## 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 <[email protected]>

Closes apache#19405 from gatorsmile/refreshView.

(cherry picked from commit e65b6b7)
Signed-off-by: gatorsmile <[email protected]>
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.

4 participants