-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29539][SQL] SHOW PARTITIONS should look up catalog/table like v2 commands #26198
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
Conversation
|
@viirya |
viirya
left a comment
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 looks fine to me. Looks like loadTable can provide partitioning info so V2 implementation can also be implemented now? @cloud-fan @rdblue
The partitioning provided by |
|
|
||
| test("SHOW PARTITIONS") { | ||
| val sql1 = "SHOW PARTITIONS t1" | ||
| val sql2 = "SHOW PARTITIONS db1.t1" |
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.
Let's add a case of a.b.c.
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.
Thanks @viirya for your review. The comment has been addressed.
|
Test build #112414 has finished for PR 26198 at commit
|
|
Test build #112436 has finished for PR 26198 at commit
|
|
the changes LGTM, let's fix the conflict |
157b755 to
248513c
Compare
|
Test build #112478 has finished for PR 26198 at commit
|
|
Conflicts fixed @viirya |
|
Thanks. Merging this to master! |
|
Thanks all for the help! |
What changes were proposed in this pull request?
Add ShowPartitionsStatement and make SHOW PARTITIONS 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.
Does this PR introduce any user-facing change?
Yes. When running SHOW PARTITIONS, 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?
Unit tests.