[SPARK-18346][SQL] TRUNCATE TABLE should fail if no partition is matched for the given non-partial partition spec#15805
Closed
cloud-fan wants to merge 2 commits into
Closed
[SPARK-18346][SQL] TRUNCATE TABLE should fail if no partition is matched for the given non-partial partition spec#15805cloud-fan wants to merge 2 commits into
cloud-fan wants to merge 2 commits into
Conversation
…on-partial partition spec
Contributor
Author
|
cc @gatorsmile |
rxin
reviewed
Nov 8, 2016
| val parts = | ||
| catalog.listPartitions(table.identifier, normalizedSpec).map(_.storage.locationUri) | ||
|
|
||
| for (spec <- partitionSpec if parts.isEmpty && spec.size == partCols.length) { |
Contributor
There was a problem hiding this comment.
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.
Contributor
|
LGTM otherwise. |
gatorsmile
reviewed
Nov 8, 2016
| spark.sessionState.conf.resolver) | ||
| } | ||
| catalog.listPartitions(table.identifier, normalizedSpec).map(_.storage.locationUri) | ||
| val parts = |
Member
There was a problem hiding this comment.
Nit: How about partLocations?
Member
|
LGTM except a minor comment and test pending Jenkins |
Contributor
|
LGTM pending Jenkins. |
|
Test build #68321 has finished for PR 15805 at commit
|
|
Test build #68328 has finished for PR 15805 at commit
|
asfgit
pushed a commit
that referenced
this pull request
Nov 8, 2016
…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 <wenchen@databricks.com> Closes #15805 from cloud-fan/truncate. (cherry picked from commit 73feaa3) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Contributor
Author
|
thanks for the review, merging to master/2.1! |
uzadude
pushed a commit
to uzadude/spark
that referenced
this pull request
Jan 27, 2017
…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 <wenchen@databricks.com> Closes apache#15805 from cloud-fan/truncate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
a follow up of #15688
How was this patch tested?
updated test in
DDLSuite