-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-22350][SQL] select grouping__id from subquery #19573
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 #83039 has finished for PR 19573 at commit
|
|
Is it similar to the below issue? |
|
@DonnyZone |
| """ | ||
| |SELECT cnt, k2, k3, grouping__id | ||
| |FROM | ||
| | (SELECT count(*) as cnt, k2, k3, grouping__id |
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.
SELECT cnt, k2, k3, alias_grouping__id
FROM
(SELECT count(*) as cnt, k2, k3, grouping__id as alias_grouping__id
FROM (SELECT key, key%2 as k2 , key%3 as k3 FROM src) t1
GROUP BY k2, k3
GROUPING SETS(k2, k3)) t2
ORDER BY alias_grouping__id, k2, k3
This is the workaround.
|
@gatorsmile |
|
@jinxing64 You can keep it open, but it might take more time to review the fix. |
|
Thanks a lot. I will leave it open(if it's ok). Actually my friend from a another company also suffers this issue. Maybe people can leave some ideas on this. |
|
Test build #83131 has finished for PR 19573 at commit
|
|
Test build #83594 has finished for PR 19573 at commit
|
|
Test build #86928 has finished for PR 19573 at commit
|
|
Test build #107638 has finished for PR 19573 at commit
|
What changes were proposed in this pull request?
Currently, sql below will fail:
The use case is common in our warehouse and supported by hive now.
Could we support it?
How was this patch tested?
Test added