-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-16853][SQL] fixes encoder error in DataSet typed select #14474
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
Test build #63151 has finished for PR 14474 at commit
|
Test build #63199 has finished for PR 14474 at commit
|
LGTM, though the test hasn't passed. |
Test build #63204 has finished for PR 14474 at commit
|
@@ -184,6 +184,17 @@ class DatasetSuite extends QueryTest with SharedSQLContext { | |||
2, 3, 4) | |||
} | |||
|
|||
test("SPARK-16853: select, case class and tuple") { |
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.
how about typed select that returns case class or tuple
?
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.
This follows existing test case name, for example, for select 2, current name is
test("select 2, primitive and tuple") {
https://github.com/apache/spark/pull/14474/files#diff-3836bd1fc5ae9c8b8ac4bdb2b9944159L196
Test build #63206 has finished for PR 14474 at commit
|
thanks, merging to master! |
Is this a bug fix? If yes, shouldn't we merge it in 2.0? |
it's a bug since the very beginning, should we merge it to 1.6 too? |
Should this one be merged into branch-2.0? |
@clockfly can you create a new PR against 2.0? thanks! |
What changes were proposed in this pull request?
For DataSet typed select:
If type T is a case class or a tuple class that is not atomic, the resulting logical plan's schema will mismatch with
Dataset[T]
encoder's schema, which will cause encoder error and throw AnalysisException.Before change:
After change:
How was this patch tested?
Unit test.