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 2022/04/14 01:32:07 UTC
[GitHub] [spark] ulysses-you commented on a diff in pull request #36177: [SPARK-38886][SQL] Remove outer join if aggregate functions are duplicate agnostic on streamed side
ulysses-you commented on code in PR #36177:
URL: https://github.com/apache/spark/pull/36177#discussion_r850014016
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/joins.scala:
##########
@@ -166,6 +176,14 @@ object EliminateOuterJoin extends Rule[LogicalPlan] with PredicateHelper {
}
}
+ private def hasNotDuplicateAgnosticAggregateFunction(
+ aggregateExpressions: Seq[NamedExpression]): Boolean = {
+ aggregateExpressions.exists(_.exists {
+ case agg: AggregateFunction => !EliminateDistinct.isDuplicateAgnostic(agg)
Review Comment:
We are safe here. At the analyzer phase we check and ban that if the aggregate function child is non-deterministic.
https://github.com/apache/spark/blob/5d763eb63b67d4fee5972559ddfe0ff3e0e8e210/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala#L290-L311
--
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-unsubscribe@spark.apache.org
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