cloud-fan commented on code in PR #39184:
URL: https://github.com/apache/spark/pull/39184#discussion_r1056011737


##########
sql/core/src/test/resources/sql-tests/inputs/group-by-all.sql:
##########
@@ -79,4 +79,9 @@ select (select count(*) from data d1 where d1.country = 
d2.country), count(id) f
 
 -- make sure we report the right error when there's an attribute in correlated 
subquery
 -- that is, to report UNRESOLVED_ALL_IN_GROUP_BY, rather than some random 
subquery error.
-select coutnry, (select count(*) from data d1 where d1.country = d2.country), 
count(id) from data d2 group by all;
\ No newline at end of file
+select coutnry, (select count(*) from data d1 where d1.country = d2.country), 
count(id) from data d2 group by all;
+
+-- make sure this still works in ansi mode; this is important because all is a 
reserved keyword
+-- in ansi, so we should make sure the analyzer rule still works.
+set spark.sql.ansi.enabled = true;
+select country, count(*) from data group by ALL;

Review Comment:
   or we can add a new file 
`sql/core/src/test/resources/sql-tests/inputs/ansi/group-by-all.sql` and put 
this test there.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to