Skip to content

Commit 1e2c26c

Browse files
ueshinmarmbrus
authored andcommitted
[SPARK-2328] [SQL] Add execution of SHOW TABLES before TestHive.reset().
`PruningSuite` is executed first of Hive tests unfortunately, `TestHive.reset()` breaks the test environment. To prevent this, we must run a query before calling reset the first time. Author: Takuya UESHIN <[email protected]> Closes #1268 from ueshin/issues/SPARK-2328 and squashes the following commits: 043ceac [Takuya UESHIN] Add execution of `SHOW TABLES` before `TestHive.reset()`.
1 parent 5c6ec94 commit 1e2c26c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ import scala.collection.JavaConversions._
2626
* A set of test cases that validate partition and column pruning.
2727
*/
2828
class PruningSuite extends HiveComparisonTest {
29+
// MINOR HACK: You must run a query before calling reset the first time.
30+
TestHive.hql("SHOW TABLES")
31+
2932
// Column/partition pruning is not implemented for `InMemoryColumnarTableScan` yet, need to reset
3033
// the environment to ensure all referenced tables in this suites are not cached in-memory.
3134
// Refer to https://issues.apache.org/jira/browse/SPARK-2283 for details.

0 commit comments

Comments
 (0)