Skip to content

Commit 7c3c864

Browse files
committed
Undo part of a SparkPlanTest change in #7162 that broke my test.
1 parent 9969c14 commit 7c3c864

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/SparkPlanTest.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ object SparkPlanTest {
301301
val resolvedPlan = TestSQLContext.prepareForExecution.execute(
302302
outputPlan transform {
303303
case plan: SparkPlan =>
304-
val inputMap = plan.children.flatMap(_.output).map(a => (a.name, a)).toMap
304+
val inputMap = plan.children.flatMap(_.output).zipWithIndex.map { case (a, i) =>
305+
(a.name, BoundReference(i, a.dataType, a.nullable))
306+
}.toMap
305307
plan.transformExpressions {
306308
case UnresolvedAttribute(Seq(u)) =>
307309
inputMap.getOrElse(u,

0 commit comments

Comments
 (0)