peter-toth commented on code in PR #52474:
URL: https://github.com/apache/spark/pull/52474#discussion_r2394005617
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/AliasAwareOutputExpression.scala:
##########
@@ -128,6 +128,16 @@ trait AliasAwareQueryOutputOrdering[T <: QueryPlan[T]]
}
}
}
- newOrdering.takeWhile(_.isDefined).flatten.toSeq
+ newOrdering.takeWhile(_.isDefined).flatten.toSeq ++
outputExpressions.filter {
+ case Alias(child, _) => child.foldable
+ case expr => expr.foldable
Review Comment:
What kind of named expressions can fall into this second case? Maybe just
```
outputExpressions.collect { case a: Alias(child, _) if child.foldable =>
a.toAttribure }
```
could work if we sort out the
https://github.com/apache/spark/pull/52474#discussion_r2393912155 UT failures.
--
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]