File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
sql/core/src/test/scala/org/apache/spark/sql/columnar Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,22 @@ import org.apache.spark.sql.test.TestSQLContext._
25
25
case class IntegerData (i : Int )
26
26
27
27
class PartitionBatchPruningSuite extends FunSuite with BeforeAndAfterAll with BeforeAndAfter {
28
- var originalColumnBatchSize = columnBatchSize
28
+ val originalColumnBatchSize = columnBatchSize
29
+ val originalInMemoryPartitionPruning = inMemoryPartitionPruning
29
30
30
31
override protected def beforeAll () {
31
32
// Make a table with 5 partitions, 2 batches per partition, 10 elements per batch
32
33
setConf(SQLConf .COLUMN_BATCH_SIZE , " 10" )
33
34
val rawData = sparkContext.makeRDD(1 to 100 , 5 ).map(IntegerData )
34
35
rawData.registerTempTable(" intData" )
36
+
37
+ // Enable in-memory partition pruning
38
+ setConf(SQLConf .IN_MEMORY_PARTITION_PRUNING , " true" )
35
39
}
36
40
37
41
override protected def afterAll () {
38
42
setConf(SQLConf .COLUMN_BATCH_SIZE , originalColumnBatchSize.toString)
43
+ setConf(SQLConf .IN_MEMORY_PARTITION_PRUNING , originalInMemoryPartitionPruning.toString)
39
44
}
40
45
41
46
before {
You can’t perform that action at this time.
0 commit comments