Uh oh!
There was an error while loading. Please reload this page.
[SPARK-15667][SQL]Throw exception if columns number of outputs mismatch the inputs - #13409
Closed
WangTaoTheTonic wants to merge 3 commits into
Closed
[SPARK-15667][SQL]Throw exception if columns number of outputs mismatch the inputs#13409WangTaoTheTonic wants to merge 3 commits into
WangTaoTheTonic wants to merge 3 commits into
Conversation
SparkQA
commented
May 31, 2016
Test build #59650 has finished for PR 13409 at commit
|
| val columnsCnt = tableDesc.getProperties.getProperty("columns").split(",").size | ||
| if (columnsCnt + numDynamicPartitions != child.output.size) { | ||
| throw new SparkException(ErrorMsg.TARGET_TABLE_COLUMN_MISMATCH.getMsg) |
Contributor
There was a problem hiding this comment.
- This check only catches cases when number of columns are different. The error message would not be precise as it would say
column number/types are different. - You could also add other info to the exception: table names and column counts
SparkQA
commented
May 31, 2016
Test build #59659 has finished for PR 13409 at commit
|
WangTaoTheTonic
commented
Jun 1, 2016
ContributorAuthor
retest this please. |
SparkQA
commented
Jun 1, 2016
Test build #59708 has finished for PR 13409 at commit
|
WangTaoTheTonic
commented
Jun 1, 2016
ContributorAuthor
cc @liancheng@andrewor14 Could you please review this? Thanks! |
SparkQA
commented
Jul 3, 2016
Test build #61688 has finished for PR 13409 at commit
|
SparkQA
commented
Jul 13, 2016
Test build #62200 has finished for PR 13409 at commit
|
WangTaoTheTonic
commented
Aug 12, 2016
ContributorAuthor
retest this please |
SparkQA
commented
Aug 12, 2016
Test build #63653 has finished for PR 13409 at commit
|
JoshRosen
commented
Sep 7, 2016
Contributor
I think this might be subsumed by @cloud-fan's #13754; can you confirm? |
cloud-fan
commented
Sep 8, 2016
Contributor
yea, it's fixed. @WangTaoTheTonic can you close this PR? thanks! |
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 freeto 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?
We will throw exception if the columns number of inputs and outputs mismatch in driver side, instead of ArrayIndexOutOfBoundsException in executor side.
How was this patch tested?
run below sql statements:
create table test(school string,province string,a int);
create table p3(school string,province string);
insert into table test select * from p3;
the driver will throw exception which message will be "Cannot insert into target table _tableName because column number are different: ...... ".