Skip to content

Commit 7f196b0

Browse files
lianchengmarmbrus
authored andcommitted
[SPARK-2283][SQL] Reset test environment before running PruningSuite
JIRA issue: [SPARK-2283](https://issues.apache.org/jira/browse/SPARK-2283) If `PruningSuite` is run right after `HiveCompatibilitySuite`, the first test case fails because `srcpart` table is cached in-memory by `HiveCompatibilitySuite`, but column pruning is not implemented for `InMemoryColumnarTableScan` operator yet. Author: Cheng Lian <lian.cs.zju@gmail.com> Closes #1221 from liancheng/spark-2283 and squashes the following commits: dc0b663 [Cheng Lian] SPARK-2283: reset test environment before running PruningSuite
1 parent 9d824fe commit 7f196b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/PruningSuite.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ import scala.collection.JavaConversions._
2626
* A set of test cases that validate partition and column pruning.
2727
*/
2828
class PruningSuite extends HiveComparisonTest {
29+
// Column/partition pruning is not implemented for `InMemoryColumnarTableScan` yet, need to reset
30+
// the environment to ensure all referenced tables in this suites are not cached in-memory.
31+
// Refer to https://issues.apache.org/jira/browse/SPARK-2283 for details.
32+
TestHive.reset()
33+
2934
// Column pruning tests
3035

3136
createPruningTest("Column pruning - with partitioned table",

0 commit comments

Comments
 (0)