Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/21677#discussion_r200244688
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/FilterPushdownBenchmark.scala
---
@@ -44,8 +49,33 @@ object FilterPushdownBenchmark {
.setIfMissing("orc.compression", "snappy")
.setIfMissing("spark.sql.parquet.compression.codec", "snappy")
+ private val numRows = 1024 * 1024 * 15
+ private val width = 5
+ private val mid = numRows / 2
+ private val blockSize = 1048576
+
private val spark = SparkSession.builder().config(conf).getOrCreate()
+ private var out: OutputStream = _
+
+ override def beforeAll() {
+ super.beforeAll()
+ out = new FileOutputStream(new
File("benchmarks/FilterPushdownBenchmark-results.txt"))
+ }
+
+ override def beforeEach(td: TestData) {
+ super.beforeEach(td)
+ val testName = "[ " + td.name + " ]"
+ val halfLength = (97 - testName.length) / 2
+ val testHeader = (("".padTo(halfLength, '#') + testName).padTo(97,
'#') + "\n").getBytes
+ out.write(testHeader)
+ }
+
+ override def afterAll() {
+ super.afterAll()
--- End diff --
nit:
```
try {
out.close()
} finally {
super.afterAll()
}
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]