viirya commented on a change in pull request #32473:
URL: https://github.com/apache/spark/pull/32473#discussion_r649471892



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/BloomFilterBenchmark.scala
##########
@@ -81,8 +85,113 @@ object BloomFilterBenchmark extends SqlBasedBenchmark {
     }
   }
 
+  private def readORCBenchmarkForInSet(): Unit = {
+    withTempPath { dir =>
+      val path = dir.getCanonicalPath
+      val samples = df2.sample(0.000003, 
128).select("value").as[String].collect()
+      val filter = "value IN (" + samples.map ( x => s"'$x'").mkString(", ") + 
")"
+
+      df2.repartition(col("value")).sort(col("value")).write.orc(path + 
"/withoutBF")
+      df2.repartition(col("value")).sort(col("value"))
+        .write.option("orc.bloom.filter.columns", "value").orc(path + 
"/withBF")
+
+      runBenchmark(s"ORC Read for IN set") {
+        val benchmark = new Benchmark(s"Read a row from 1M rows", 1000 * 1000, 
output = output)

Review comment:
       ditto.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to