File tree Expand file tree Collapse file tree
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,8 +146,6 @@ object PartialAggregation {
146146 case other => (other, Alias (other, " PartialGroup" )())
147147 }.toMap
148148
149- def trimGetFieldAliases (e : Expression ) = e.transform { case Alias (g : GetField , _) => g }
150-
151149 // Replace aggregations with a new expression that computes the result from the already
152150 // computed partial evaluations and grouping values.
153151 val rewrittenAggregateExpressions = aggregateExpressions.map(_.transformUp {
@@ -159,8 +157,7 @@ object PartialAggregation {
159157 // resolving struct field accesses, because `GetField` is not a `NamedExpression`.
160158 // (Should we just turn `GetField` into a `NamedExpression`?)
161159 namedGroupingExpressions
162- .get(e)
163- .orElse(namedGroupingExpressions.get(trimGetFieldAliases(e)))
160+ .get(e.transform { case Alias (g : GetField , _) => g })
164161 .map(_.toAttribute)
165162 .getOrElse(e)
166163 }).asInstanceOf [Seq [NamedExpression ]]
You can’t perform that action at this time.
0 commit comments