diff options
Diffstat (limited to 'sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala')
-rw-r--r-- | sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala index cfca93bbf0..e67fcbedc3 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala @@ -480,7 +480,11 @@ abstract class HiveComparisonTest val executions = queryList.map(new TestHive.QueryExecution(_)) executions.foreach(_.toRdd) val tablesGenerated = queryList.zip(executions).flatMap { - case (q, e) => e.sparkPlan.collect { + // We should take executedPlan instead of sparkPlan, because in following codes we + // will run the collected plans. As we will do extra processing for sparkPlan such + // as adding exchange, collapsing codegen stages, etc., collecting sparkPlan here + // will cause some errors when running these plans later. + case (q, e) => e.executedPlan.collect { case i: InsertIntoHiveTable if tablesRead contains i.table.tableName => (q, e, i) } |