You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/14 07:49:20 UTC
[GitHub] [spark] maropu commented on a change in pull request #29740: [SPARK-32868][SQL] Add more order irrelevant aggregates to EliminateSorts
maropu commented on a change in pull request #29740:
URL: https://github.com/apache/spark/pull/29740#discussion_r487716283
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -1044,7 +1044,7 @@ object EliminateSorts extends Rule[LogicalPlan] {
private def isOrderIrrelevantAggs(aggs: Seq[NamedExpression]): Boolean = {
def isOrderIrrelevantAggFunction(func: AggregateFunction): Boolean = func match {
- case _: Min | _: Max | _: Count => true
+ case _: Min | _: Max | _: Count | _: BitAggregate | _: HyperLogLogPlusPlus => true
Review comment:
(IMHO) even if so, we don't have any restriction about the deteminisity of the `HyperLogLogPlusPlus` impmentation. So, adding it in this rule look a bit dangerous.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org