Skip to content

Commit 779da56

Browse files
committed
More consistent naming.
1 parent 1a4e9ea commit 779da56

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ object ColumnPruning extends Rule[LogicalPlan] {
6666

6767
Project(projectList, Join(prunedChild(left), prunedChild(right), joinType, condition))
6868

69-
case Project(project1, Project(project2, child)) =>
69+
case Project(projectList1, Project(projectList2, child)) =>
7070
// Create a map of Aliases to their values from the child projection.
7171
// e.g., 'SELECT ... FROM (SELECT a + b AS c, d ...)' produces Map(c -> Alias(a + b, c)).
72-
val aliasMap = project2.collect {
72+
val aliasMap = projectList2.collect {
7373
case a @ Alias(e, _) => (a.toAttribute: Expression, a)
7474
}.toMap
7575

7676
// Substitute any attributes that are produced by the child projection, so that we safely
7777
// eliminate it.
7878
// e.g., 'SELECT c + 1 FROM (SELECT a + b AS C ...' produces 'SELECT a + b + 1 ...'
7979
// TODO: Fix TransformBase to avoid the cast below.
80-
val substitutedProjection = project1.map(_.transform {
80+
val substitutedProjection = projectList1.map(_.transform {
8181
case a if aliasMap.contains(a) => aliasMap(a)
8282
}).asInstanceOf[Seq[NamedExpression]]
8383

0 commit comments

Comments
 (0)