[SPARK-15871][SQL] Add assertNotPartitioned check in DataFrameWriter#13597
Closed
lw-lin wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-15871][SQL] Add assertNotPartitioned check in DataFrameWriter#13597lw-lin wants to merge 1 commit intoapache:masterfrom
assertNotPartitioned check in DataFrameWriter#13597lw-lin wants to merge 1 commit intoapache:masterfrom
Conversation
|
|
||
| private def assertNotBucketed(operation: String): Unit = { | ||
| if (numBuckets.isDefined || sortColumnNames.isDefined) { | ||
| throw new IllegalArgumentException( |
Contributor
Author
There was a problem hiding this comment.
@cloud-fan, do you mind if this patch change IllegalArgumentException here to AnalysisException? In most places in this class we throw AnalysisException, :-)
This change should be OK as this has only been in the 2.0-preview release.
Contributor
There was a problem hiding this comment.
I don't have strong preference here.
|
Test build #60292 has finished for PR 13597 at commit
|
Contributor
Author
|
@marmbrus @cloud-fan @zsxwing , would you mind taking a look? Thanks! :-) |
Member
|
LGTM. @marmbrus what do you think? |
Contributor
|
Seems fine to me. |
Member
|
Thanks, merging to master and 2.0. |
asfgit
pushed a commit
that referenced
this pull request
Jun 10, 2016
## What changes were proposed in this pull request? It doesn't make sense to specify partitioning parameters, when we write data out from Datasets/DataFrames into `jdbc` tables or streaming `ForeachWriter`s. This patch adds `assertNotPartitioned` check in `DataFrameWriter`. <table> <tr> <td align="center"><strong>operation</strong></td> <td align="center"><strong>should check not partitioned?</strong></td> </tr> <tr> <td align="center">mode</td> <td align="center"></td> </tr> <tr> <td align="center">outputMode</td> <td align="center"></td> </tr> <tr> <td align="center">trigger</td> <td align="center"></td> </tr> <tr> <td align="center">format</td> <td align="center"></td> </tr> <tr> <td align="center">option/options</td> <td align="center"></td> </tr> <tr> <td align="center">partitionBy</td> <td align="center"></td> </tr> <tr> <td align="center">bucketBy</td> <td align="center"></td> </tr> <tr> <td align="center">sortBy</td> <td align="center"></td> </tr> <tr> <td align="center">save</td> <td align="center"></td> </tr> <tr> <td align="center">queryName</td> <td align="center"></td> </tr> <tr> <td align="center">startStream</td> <td align="center"></td> </tr> <tr> <td align="center">foreach</td> <td align="center">yes</td> </tr> <tr> <td align="center">insertInto</td> <td align="center"></td> </tr> <tr> <td align="center">saveAsTable</td> <td align="center"></td> </tr> <tr> <td align="center">jdbc</td> <td align="center">yes</td> </tr> <tr> <td align="center">json</td> <td align="center"></td> </tr> <tr> <td align="center">parquet</td> <td align="center"></td> </tr> <tr> <td align="center">orc</td> <td align="center"></td> </tr> <tr> <td align="center">text</td> <td align="center"></td> </tr> <tr> <td align="center">csv</td> <td align="center"></td> </tr> </table> ## How was this patch tested? New dedicated tests. Author: Liwei Lin <lwlin7@gmail.com> Closes #13597 from lw-lin/add-assertNotPartitioned. (cherry picked from commit fb21902) Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
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?
It doesn't make sense to specify partitioning parameters, when we write data out from Datasets/DataFrames into
jdbctables or streamingForeachWriters.This patch adds
assertNotPartitionedcheck inDataFrameWriter.How was this patch tested?
New dedicated tests.