uros-db commented on code in PR #45929:
URL: https://github.com/apache/spark/pull/45929#discussion_r1555767969


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ExprUtils.scala:
##########
@@ -168,7 +168,13 @@ object ExprUtils extends QueryErrorsBase {
         a.failAnalysis(
           errorClass = "MISSING_GROUP_BY",
           messageParameters = Map.empty)
-      case e: Attribute if !a.groupingExpressions.exists(_.semanticEquals(e)) 
=>
+      case e: Attribute if !a.groupingExpressions.exists(_.semanticEquals(e)) 
&&
+        !a.groupingExpressions.exists {

Review Comment:
   without it, it hits the 
`QueryCompilationErrors.columnNotInGroupByClauseError(e)`
   
   with query plan:
   ```
   Aggregate [collationkey(name#17)], [any_value(name#17, false) AS name#24, 
count(1) AS count(1)#20L]
   +- LogicalRDD [name#17], false
   ```
   
   so name#17 is not found in groupingExpressions



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