-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-18346][SQL] TRUNCATE TABLE should fail if no partition is matched for the given non-partial partition spec #15805
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
…on-partial partition spec
|
cc @gatorsmile |
| val parts = | ||
| catalog.listPartitions(table.identifier, normalizedSpec).map(_.storage.locationUri) | ||
|
|
||
| for (spec <- partitionSpec if parts.isEmpty && spec.size == partCols.length) { |
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.
i'd add a line of comment saying explicitly we fail if the partition spec is fully specified (not partial) and the partition does not exist.
|
LGTM otherwise. |
| spark.sessionState.conf.resolver) | ||
| } | ||
| catalog.listPartitions(table.identifier, normalizedSpec).map(_.storage.locationUri) | ||
| val parts = |
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.
Nit: How about partLocations?
|
LGTM except a minor comment and test pending Jenkins |
|
LGTM pending Jenkins. |
|
Test build #68321 has finished for PR 15805 at commit
|
|
Test build #68328 has finished for PR 15805 at commit
|
…hed for the given non-partial partition spec ## What changes were proposed in this pull request? a follow up of #15688 ## How was this patch tested? updated test in `DDLSuite` Author: Wenchen Fan <[email protected]> Closes #15805 from cloud-fan/truncate. (cherry picked from commit 73feaa3) Signed-off-by: Wenchen Fan <[email protected]>
|
thanks for the review, merging to master/2.1! |
…hed for the given non-partial partition spec ## What changes were proposed in this pull request? a follow up of apache#15688 ## How was this patch tested? updated test in `DDLSuite` Author: Wenchen Fan <[email protected]> Closes apache#15805 from cloud-fan/truncate.
What changes were proposed in this pull request?
a follow up of #15688
How was this patch tested?
updated test in
DDLSuite