Skip to content

Commit 5c7848d

Browse files
committed
turn off caching in the constructor
1 parent 8074a80 commit 5c7848d

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,8 @@ import org.apache.spark.sql.hive.test.TestHive
2929
import org.apache.spark.sql.hive.test.TestHive._
3030

3131
class StatisticsSuite extends QueryTest with BeforeAndAfterAll {
32-
33-
override def beforeAll() = {
34-
// HACK: Cached tables do not currently preserve statistics...
35-
TestHive.cacheTables = false
36-
}
37-
38-
override def afterAll() = {
39-
TestHive.cacheTables = true
40-
}
32+
TestHive.reset()
33+
TestHive.cacheTables = false
4134

4235
test("parse analyze commands") {
4336
def assertAnalyzeCommand(analyzeCommand: String, c: Class[_]) {

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ import scala.collection.JavaConversions._
3030
class PruningSuite extends HiveComparisonTest with BeforeAndAfter {
3131
// MINOR HACK: You must run a query before calling reset the first time.
3232
TestHive.sql("SHOW TABLES")
33-
34-
override def beforeAll() = {
35-
TestHive.cacheTables = false
36-
}
33+
TestHive.cacheTables = false
3734

3835
// Column/partition pruning is not implemented for `InMemoryColumnarTableScan` yet, need to reset
3936
// the environment to ensure all referenced tables in this suites are not cached in-memory.

0 commit comments

Comments
 (0)