peter-toth commented on code in PR #37334:
URL: https://github.com/apache/spark/pull/37334#discussion_r937351959
##########
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:
I don't know, this was the only place where I had to modify the code to
avoid conflicts.
But I was thinking about that instead of the new `assert` in the rule, we
could fix these conflicting attributes with inserting a `Project`. How about
that?
--
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]