-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-36339][SQL][3.0] References to grouping that not part of aggregation should be replaced #33669
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
…n should be replaced
Currently, references to grouping sets are reported as errors after aggregated expressions, e.g.
```
SELECT count(name) c, name
FROM VALUES ('Alice'), ('Bob') people(name)
GROUP BY name GROUPING SETS(name);
```
Error in query: expression 'people.`name`' is neither present in the group by, nor is it an aggregate function. Add to group by or wrap in first() (or first_value) if you don't care which value you get.;;
Fix the map anonymous function in the constructAggregateExprs function does not use underscores to avoid
No
Unit tests.
Closes apache#33574 from gaoyajun02/SPARK-36339.
Lead-authored-by: gaoyajun02 <[email protected]>
Co-authored-by: gaoyajun02 <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit 888f8f0)
|
ok to test |
|
can we also add the test? |
|
Test build #142163 has started for PR 33669 at commit |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Sorry for the missing UT, added |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #142186 has finished for PR 33669 at commit
|
…gation should be replaced
### What changes were proposed in this pull request?
Currently, references to grouping sets are reported as errors after aggregated expressions, e.g.
```
SELECT count(name) c, name
FROM VALUES ('Alice'), ('Bob') people(name)
GROUP BY name GROUPING SETS(name);
```
Error in query: expression 'people.`name`' is neither present in the group by, nor is it an aggregate function. Add to group by or wrap in first() (or first_value) if you don't care which value you get.;;
### Why are the changes needed?
Fix the map anonymous function in the constructAggregateExprs function does not use underscores to avoid
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Unit tests.
Closes #33669 from gaoyajun02/branch-3.0.
Authored-by: gaoyajun02 <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
…gation should be replaced
Currently, references to grouping sets are reported as errors after aggregated expressions, e.g.
```
SELECT count(name) c, name
FROM VALUES ('Alice'), ('Bob') people(name)
GROUP BY name GROUPING SETS(name);
```
Error in query: expression 'people.`name`' is neither present in the group by, nor is it an aggregate function. Add to group by or wrap in first() (or first_value) if you don't care which value you get.;;
Fix the map anonymous function in the constructAggregateExprs function does not use underscores to avoid
No
Unit tests.
Closes #33669 from gaoyajun02/branch-3.0.
Authored-by: gaoyajun02 <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit e10cc78)
Signed-off-by: Wenchen Fan <[email protected]>
|
thanks, merging to 3.0/3.1! |
…gation should be replaced
Currently, references to grouping sets are reported as errors after aggregated expressions, e.g.
```
SELECT count(name) c, name
FROM VALUES ('Alice'), ('Bob') people(name)
GROUP BY name GROUPING SETS(name);
```
Error in query: expression 'people.`name`' is neither present in the group by, nor is it an aggregate function. Add to group by or wrap in first() (or first_value) if you don't care which value you get.;;
Fix the map anonymous function in the constructAggregateExprs function does not use underscores to avoid
No
Unit tests.
Closes apache#33669 from gaoyajun02/branch-3.0.
Authored-by: gaoyajun02 <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit e10cc78)
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit e1a549c)
Signed-off-by: Dongjoon Hyun <[email protected]>
…gation should be replaced
Currently, references to grouping sets are reported as errors after aggregated expressions, e.g.
```
SELECT count(name) c, name
FROM VALUES ('Alice'), ('Bob') people(name)
GROUP BY name GROUPING SETS(name);
```
Error in query: expression 'people.`name`' is neither present in the group by, nor is it an aggregate function. Add to group by or wrap in first() (or first_value) if you don't care which value you get.;;
Fix the map anonymous function in the constructAggregateExprs function does not use underscores to avoid
No
Unit tests.
Closes apache#33669 from gaoyajun02/branch-3.0.
Authored-by: gaoyajun02 <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit e10cc78)
Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
Currently, references to grouping sets are reported as errors after aggregated expressions, e.g.
Error in query: expression 'people.
name' is neither present in the group by, nor is it an aggregate function. Add to group by or wrap in first() (or first_value) if you don't care which value you get.;;Why are the changes needed?
Fix the map anonymous function in the constructAggregateExprs function does not use underscores to avoid
Does this PR introduce any user-facing change?
No
How was this patch tested?
Unit tests.