Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses-you committed Jun 19, 2020
1 parent f6d574a commit 8f86b42
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -552,11 +552,12 @@ class FileSourceStrategySuite extends QueryTest with SharedSparkSession with Pre
withSQLConf(SQLConf.FILES_MIN_PARTITION_NUM.key -> "16") {
val partitions = (1 to 100).map(i => s"file$i" -> 128*1024*1024)
val table = createTable(files = partitions)
assert(table.rdd.partitions.length == 16)
// partition is limit by filesMaxPartitionBytes(128MB)
assert(table.rdd.partitions.length == 100)
}

withSQLConf(SQLConf.FILES_MIN_PARTITION_NUM.key -> "32") {
val partitions = (1 to 500).map(i => s"file$i" -> 4*1024*1024)
val partitions = (1 to 800).map(i => s"file$i" -> 4*1024*1024)
val table = createTable(files = partitions)
assert(table.rdd.partitions.length == 32)
}
Expand Down

0 comments on commit 8f86b42

Please sign in to comment.