Skip to content

Conversation

@liancheng
Copy link
Contributor

When actual row length doesn't conform to specified schema field length, we should give a better error message instead of throwing an unintuitive ArrayOutOfBoundsException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if we should throw IllegalStateException because AssertionError can be disabled.

Also, regarding the error message, I wondering if something like The given row does not have the same number of values required by the schema. ${fields.length} values are expected. But, ${array.length} values are provided maybe a better one.

@SparkQA
Copy link

SparkQA commented Jan 24, 2016

Test build #49945 has finished for PR 10886 at commit ae0b55a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Jan 25, 2016

cc @davies

@davies
Copy link
Contributor

davies commented Jan 25, 2016

LGTM

@SparkQA
Copy link

SparkQA commented Jan 25, 2016

Test build #49958 has finished for PR 10886 at commit ad8efa1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@yhuai
Copy link
Contributor

yhuai commented Jan 25, 2016

Thanks! Merging to master and branch 1.6.

asfgit pushed a commit that referenced this pull request Jan 25, 2016
…to Python rows

When actual row length doesn't conform to specified schema field length, we should give a better error message instead of throwing an unintuitive `ArrayOutOfBoundsException`.

Author: Cheng Lian <[email protected]>

Closes #10886 from liancheng/spark-12624.

(cherry picked from commit 3327fd2)
Signed-off-by: Yin Huai <[email protected]>
@asfgit asfgit closed this in 3327fd2 Jan 25, 2016
@liancheng
Copy link
Contributor Author

Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants