We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18ac8fb commit 1498b09Copy full SHA for 1498b09
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
@@ -1786,7 +1786,7 @@ object PushPredicateThroughNonJoin extends Rule[LogicalPlan] with PredicateHelpe
1786
// attributes produced by the aggregate operator's child operator.
1787
val (pushDown, stayUp) = splitConjunctivePredicates(condition).partition { cond =>
1788
val replaced = replaceAlias(cond, aliasMap)
1789
- cond.deterministic && !cond.throwable && canCollapseExpression(cond, aliasMap)
+ cond.deterministic && !cond.throwable && canCollapseExpression(cond, aliasMap) &&
1790
cond.references.nonEmpty && replaced.references.subsetOf(aggregate.child.outputSet)
1791
}
1792
0 commit comments