Skip to content

Commit 80ddcc6

Browse files
committed
keep project
1 parent b69d385 commit 80ddcc6

File tree

1 file changed

+2
-2
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer

1 file changed

+2
-2
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ object ColumnPruning extends Rule[LogicalPlan] {
119119
case a @ Aggregate(_, _, child) if (child.outputSet -- a.references).nonEmpty =>
120120
a.copy(child = Project(a.references.toSeq, child))
121121

122-
case p @ Project(_, Aggregate(ge, ec, child))
122+
case p @ Project(pl, Aggregate(ge, ec, child))
123123
if (ec.map(_.references).toSet -- p.references).nonEmpty =>
124-
Aggregate(ge, ec.filter(e => p.references.contains(e)), child)
124+
Project(pl, Aggregate(ge, ec.filter(e => p.references.contains(e)), child))
125125

126126
// Eliminate unneeded attributes from either side of a Join.
127127
case Project(projectList, Join(left, right, joinType, condition)) =>

0 commit comments

Comments
 (0)