-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-11819][SQL] nice error message for missing encoder #9810
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
|
cc @marmbrus |
|
Test build #46217 has finished for PR 9810 at commit
|
|
Test build #46220 has finished for PR 9810 at commit
|
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.
scala doc please
|
This message looks great! |
|
This is really cool. |
8d8d857 to
da13931
Compare
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.
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 actually think this looks pretty good.
|
Test build #46328 has finished for PR 9810 at commit
|
da13931 to
ddb092a
Compare
|
Test build #46329 has finished for PR 9810 at commit
|
|
retest this please. |
|
Test build #46335 has finished for PR 9810 at commit
|
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.
Why is this a separate function now? Now we have duplicated copies of the same logic that can fall out of sync.
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 tried but stuck with array handling. For array we use MapObjects and call extractorFor lazily as a function parameter. Any ideas for it?
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.
An initial eager call with a dummy attribute reference?
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.
sounds good, let me have a try
ddb092a to
c263c14
Compare
|
Test build #46385 has finished for PR 9810 at commit
|
|
Thanks, merging to master and 1.6. |
before this PR, when users try to get an encoder for an un-supported class, they will only get a very simple error message like `Encoder for type xxx is not supported`. After this PR, the error message become more friendly, for example: ``` No Encoder found for abc.xyz.NonEncodable - array element class: "abc.xyz.NonEncodable" - field (class: "scala.Array", name: "arrayField") - root class: "abc.xyz.AnotherClass" ``` Author: Wenchen Fan <wenchen@databricks.com> Closes #9810 from cloud-fan/error-message. (cherry picked from commit 3b9d2a3) Signed-off-by: Michael Armbrust <michael@databricks.com>
|
I think that this doesn't work on Scala 2.11: https://amplab.cs.berkeley.edu/jenkins/view/Spark-QA-Compile/job/Spark-Master-Scala211-Compile/2156/console |
|
@JoshRosen , I think the reason maybe that, I defined some private methods in |
before this PR, when users try to get an encoder for an un-supported class, they will only get a very simple error message like
Encoder for type xxx is not supported.After this PR, the error message become more friendly, for example: