Skip to content

Commit

Permalink
Undo part of a SparkPlanTest change in apache#7162 that broke my test.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jul 6, 2015
1 parent 9969c14 commit 7c3c864
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ object SparkPlanTest {
val resolvedPlan = TestSQLContext.prepareForExecution.execute(
outputPlan transform {
case plan: SparkPlan =>
val inputMap = plan.children.flatMap(_.output).map(a => (a.name, a)).toMap
val inputMap = plan.children.flatMap(_.output).zipWithIndex.map { case (a, i) =>
(a.name, BoundReference(i, a.dataType, a.nullable))
}.toMap
plan.transformExpressions {
case UnresolvedAttribute(Seq(u)) =>
inputMap.getOrElse(u,
Expand Down

0 comments on commit 7c3c864

Please sign in to comment.