Skip to content

Commit

Permalink
perf: Add benchmarks for Spark Scan + Comet Exec (apache#863)
Browse files Browse the repository at this point in the history
* Add benchmarks for Spark Scan + Comet Exec

* address feedback

* address feedback

* revert removing env var from usage examples

* fix
  • Loading branch information
andygrove authored Aug 23, 2024
1 parent 3b497a2 commit cff7697
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,20 @@ object CometTPCDSMicroBenchmark extends CometTPCQueryBenchmarkBase {
cometSpark.sql(queryString).noop()
}
}
benchmark.addCase(s"$name$nameSuffix: Comet (Exec)") { _ =>
withSQLConf(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_NATIVE_SCAN_ENABLED.key -> "false",
CometConf.COMET_CONVERT_FROM_PARQUET_ENABLED.key -> "true",
CometConf.COMET_EXEC_SHUFFLE_ENABLED.key -> "true",
CometConf.COMET_SHUFFLE_MODE.key -> "auto",
CometConf.COMET_REGEXP_ALLOW_INCOMPATIBLE.key -> "true",
// enabling COMET_EXPLAIN_NATIVE_ENABLED may add overhead but is useful for debugging
CometConf.COMET_EXPLAIN_NATIVE_ENABLED.key -> "false",
CometConf.COMET_EXEC_ENABLED.key -> "true") {
cometSpark.sql(queryString).noop()
}
}
benchmark.run()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ trait CometTPCQueryBenchmarkBase extends SqlBasedBenchmark with CometTPCQueryBas
cometSpark.sql(queryString).noop()
}
}
benchmark.addCase(s"$name$nameSuffix: Comet (Exec)") { _ =>
withSQLConf(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "true",
CometConf.COMET_NATIVE_SCAN_ENABLED.key -> "false",
CometConf.COMET_CONVERT_FROM_PARQUET_ENABLED.key -> "true",
CometConf.COMET_EXEC_SHUFFLE_ENABLED.key -> "true",
CometConf.COMET_SHUFFLE_MODE.key -> "auto") {
cometSpark.sql(queryString).noop()
}
}
benchmark.run()
}
}
Expand Down

0 comments on commit cff7697

Please sign in to comment.