andygrove commented on code in PR #5371:
URL: https://github.com/apache/datafusion-comet/pull/5371#discussion_r3790442232
##########
spark/src/test/scala/org/apache/spark/sql/benchmark/CometBenchmarkBase.scala:
##########
@@ -125,50 +131,103 @@ trait CometBenchmarkBase
extraCometConfigs: Map[String, String] = Map.empty): Unit = {
val benchmark = new Benchmark(name, cardinality, output = output)
- benchmark.addCase("Spark") { _ =>
- withSQLConf(CometConf.COMET_ENABLED.key -> "false") {
- spark.sql(query).noop()
- }
- }
+ // Constant folding is excluded so that expressions over literal arguments
are still evaluated
+ // per row. It must be excluded for both arms: if only Comet excludes it,
Spark folds the
+ // expression away and does no per-row work, and the comparison is
meaningless.
+ val noConstantFolding =
Review Comment:
Fixed. Thanks for suggesting that.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]