Skip to content
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-29526][SQL] UNCACHE TABLE should look up catalog/table like v2 commands #26237

Closed
wants to merge 4 commits into from

Conversation

imback82
Copy link
Contributor

What changes were proposed in this pull request?

Add UncacheTableStatement and make UNCACHE TABLE go through the same catalog/table resolution framework of v2 commands.

Why are the changes needed?

It's important to make all the commands have the same table resolution behavior, to avoid confusing end-users. e.g.

USE my_catalog
DESC t // success and describe the table t from my_catalog
UNCACHE TABLE t // report table not found as there is no table t in the session catalog

Does this PR introduce any user-facing change?

yes. When running UNCACHE TABLE, Spark fails the command if the current catalog is set to a v2 catalog, or the table name specified a v2 catalog.

How was this patch tested?

New unit tests

@imback82 imback82 changed the title [SPARK-29526][SQL] REFRESH TABLE should look up catalog/table like v2 commands [SPARK-29526][SQL] UNCACHE TABLE should look up catalog/table like v2 commands Oct 24, 2019
@imback82
Copy link
Contributor Author

cc: @cloud-fan / @viirya / @rdblue

@imback82
Copy link
Contributor Author

@viirya When #26179 is merged, I can rearrange the code so that cache/uncache go together.

@SparkQA
Copy link

SparkQA commented Oct 24, 2019

Test build #112576 has finished for PR 26237 at commit 9f234e9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class UncacheTableStatement(

@SparkQA
Copy link

SparkQA commented Oct 24, 2019

Test build #112608 has finished for PR 26237 at commit 7481684.

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

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. (I left two minor comments, @imback82 ).

@dongjoon-hyun
Copy link
Member

Thank you, @imback82 , @cloud-fan , @viirya .

The last commit is only comment and test case name changes in DDLParserSuite. For DDLParserSuite, I manually ran the test again.

Merged to master.

@imback82
Copy link
Contributor Author

Thanks everyone!

@imback82 imback82 deleted the uncache_table branch October 24, 2019 23:08
@SparkQA
Copy link

SparkQA commented Oct 25, 2019

Test build #112625 has finished for PR 26237 at commit 53448b2.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants