File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ object PullOutGroupingExpressions extends Rule[LogicalPlan] {
5252 val newGroupingExpressions = a.groupingExpressions
5353 .filterNot(AggregateExpression .containsAggregate)
5454 .map {
55- case e if AggregateExpression .isAggregate(e) => e
5655 case e if ! e.foldable && e.children.nonEmpty =>
5756 complexGroupingExpressionMap
5857 .getOrElseUpdate(e.canonicalized, Alias (e, s " _groupingexpression " )())
@@ -62,7 +61,7 @@ object PullOutGroupingExpressions extends Rule[LogicalPlan] {
6261 if (complexGroupingExpressionMap.nonEmpty) {
6362 def replaceComplexGroupingExpressions (e : Expression ): Expression = {
6463 e match {
65- case _ if AggregateExpression .isAggregate(e) => e
64+ case _ if e.foldable => e
6665 case _ if complexGroupingExpressionMap.contains(e.canonicalized) =>
6766 complexGroupingExpressionMap.get(e.canonicalized).map(_.toAttribute).getOrElse(e)
6867 case _ => e.mapChildren(replaceComplexGroupingExpressions)
You can’t perform that action at this time.
0 commit comments