Skip to content

Commit 4254f6c

Browse files
committed
Enables in-memory partition pruning in PartitionBatchPruningSuite
1 parent 3784105 commit 4254f6c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sql/core/src/test/scala/org/apache/spark/sql/columnar/PartitionBatchPruningSuite.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,22 @@ import org.apache.spark.sql.test.TestSQLContext._
2525
case class IntegerData(i: Int)
2626

2727
class PartitionBatchPruningSuite extends FunSuite with BeforeAndAfterAll with BeforeAndAfter {
28-
var originalColumnBatchSize = columnBatchSize
28+
val originalColumnBatchSize = columnBatchSize
29+
val originalInMemoryPartitionPruning = inMemoryPartitionPruning
2930

3031
override protected def beforeAll() {
3132
// Make a table with 5 partitions, 2 batches per partition, 10 elements per batch
3233
setConf(SQLConf.COLUMN_BATCH_SIZE, "10")
3334
val rawData = sparkContext.makeRDD(1 to 100, 5).map(IntegerData)
3435
rawData.registerTempTable("intData")
36+
37+
// Enable in-memory partition pruning
38+
setConf(SQLConf.IN_MEMORY_PARTITION_PRUNING, "true")
3539
}
3640

3741
override protected def afterAll() {
3842
setConf(SQLConf.COLUMN_BATCH_SIZE, originalColumnBatchSize.toString)
43+
setConf(SQLConf.IN_MEMORY_PARTITION_PRUNING, originalInMemoryPartitionPruning.toString)
3944
}
4045

4146
before {

0 commit comments

Comments
 (0)