beliefer commented on code in PR #49908: URL: https://github.com/apache/spark/pull/49908#discussion_r1957666283
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/collect.scala: ########## @@ -330,8 +330,14 @@ case class ListAgg( override def isDistinctSupported: Boolean = true - override def withOrderingWithinGroup(orderingWithinGroup: Seq[SortOrder]): AggregateFunction = + override def withOrderingWithinGroup( + orderingWithinGroup: Seq[SortOrder], u: UnresolvedFunction): AggregateFunction = { + if (u.isDistinct && !isOrderCompatible(orderingWithinGroup)) { Review Comment: I think the special behavior should be validated by themselves if we can't find a common way. -- 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