cloud-fan commented on a change in pull request #32089:
URL: https://github.com/apache/spark/pull/32089#discussion_r610632276



##########
File path: 
sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out
##########
@@ -122,7 +122,7 @@ select a, b, sum(b) from data group by 3
 struct<>
 -- !query output
 org.apache.spark.sql.AnalysisException
-aggregate functions are not allowed in GROUP BY, but found sum(data.b)
+GROUP BY expression in position 3 is or contains an aggregate function. 
Aggregate functions are not allowed in GROUP BY, but got sum(data.b) AS 
`sum(b)`; line 1 pos 39

Review comment:
       I'm reading the error message again but feel it's hard to understand. 
How about
   ```
   GROUP BY 3 refers to an expression that is or contains an aggregate 
function. Aggregate functions are not allowed ...
   ```




-- 
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.

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