peter-toth commented on code in PR #37334:
URL: https://github.com/apache/spark/pull/37334#discussion_r935758986


##########
sql/core/src/main/scala/org/apache/spark/sql/RelationalGroupedDataset.scala:
##########
@@ -596,11 +597,13 @@ class RelationalGroupedDataset protected[sql](
       s"The returnType of the udf must be a ${StructType.simpleString}")
 
     val leftGroupingNamedExpressions = groupingExprs.map {
+      case a: Attribute => Alias(a, a.name)()
       case ne: NamedExpression => ne
       case other => Alias(other, other.toString)()
     }
 
     val rightGroupingNamedExpressions = r.groupingExprs.map {
+      case a: Attribute => Alias(a, a.name)()

Review Comment:
   These changes are needed to make the output of `Project`s in line 615/617 
unique. Without these the new assert in `removeRedundantAliases()` would fail.



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