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


##########
sql/core/src/main/scala/org/apache/spark/sql/RelationalGroupedDataset.scala:
##########
@@ -708,7 +708,7 @@ private[sql] object RelationalGroupedDataset {
     case expr: NamedExpression => expr
     case a: AggregateExpression if 
a.aggregateFunction.isInstanceOf[TypedAggregateExpression] =>
       UnresolvedAlias(a, Some(Column.generateAlias))
-    case u: UnresolvedFunction => UnresolvedAlias(expr, None)
+    case e if !e.resolved => UnresolvedAlias(expr, None)

Review Comment:
   I changed the `AggregateExpression` path to `case a: AggregateExpression => 
UnresolvedAlias(a, Some(Column.generateAlias))` but still kept the `case _ if 
!expr.resolved => UnresolvedAlias(expr, None)` because in the 
`plus_one(sum_udf(col("v1")))` case an unresolved `PythonUDF` is passed here.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to