Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/22484#discussion_r220026018
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/AggregateBenchmark.scala
---
@@ -73,23 +73,26 @@ object AggregateBenchmark extends SqlBasedBenchmark {
spark.range(N).selectExpr("(id & 65535) as
k").groupBy("k").sum().collect()
}
- benchmark.addCase(s"codegen = F", numIters = 2) { iter =>
- spark.conf.set("spark.sql.codegen.wholeStage", "false")
- f()
+ benchmark.addCase(s"codegen = F", numIters = 2) { _ =>
+ withSQLConf(SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key ->
false.toString) {
--- End diff --
When we use `Seq(true, false).foreach { value =>`, we usually do
`s"$value"`. But, for this, I think `"false"` is the simplest and the best.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]