-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-11949][SQL] Set field nullable property for GroupingSets to get correct results for null values #10038
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 #46876 has finished for PR 10038 at commit
|
|
Test build #46879 has finished for PR 10038 at commit
|
|
retest this please. |
|
So, the problem is caused by the nullability setting? Does rollup have the same problem? |
|
@yhuai yeah. Because rollup and cube will be transformed to |
|
Test build #46888 has finished for PR 10038 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.
Maybe we need to check the bitmasks? I mean if we something like GROUPING SETS ( (a,b), a), we do not need to change the nullability of a, right?
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 is a minor issue since setting nullable to true does not cause wrong results)
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.
Indeed, I think you are right. I will update this later. Thanks.
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.
Yeah, that is right too.
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.
Do you want to update it in this PR?
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 can be merged first. I will add a following one for the issue later. If it is ok for you.
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.
OK. Sounds good. I will add a TODO at here when I merge 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.
Friendly ping, if we can fix this last comment we can probably include this in 1.6-RC1.
|
@viirya Thank you for the fix. It overall looks good. Can you update the title to make it provide more information about the issue? |
|
@yhuai It is updated. |
|
@yhuai Is this title ok for you? |
|
Merging to master and branch 1.6. |
…t correct results for null values JIRA: https://issues.apache.org/jira/browse/SPARK-11949 The result of cube plan uses incorrect schema. The schema of cube result should set nullable property to true because the grouping expressions will have null values. Author: Liang-Chi Hsieh <viirya@appier.com> Closes #10038 from viirya/fix-cube. (cherry picked from commit c87531b) Signed-off-by: Yin Huai <yhuai@databricks.com>
JIRA: https://issues.apache.org/jira/browse/SPARK-11949
The result of cube plan uses incorrect schema. The schema of cube result should set nullable property to true because the grouping expressions will have null values.