Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ object CometTPCDSMicroBenchmark extends CometTPCQueryBenchmarkBase {
benchmarkName: String,
nameSuffix: String = ""): Unit = {
queries.foreach { name =>
val source = Source.fromFile(s"spark/src/test/resources/tpcds-micro-benchmarks/$name.sql")
val source = Source.fromFile(s"src/test/resources/tpcds-micro-benchmarks/$name.sql")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to modify the path to get the benchmark working from the command-line

val queryString = source
.getLines()
.filterNot(_.startsWith("--"))
Expand All @@ -108,34 +108,13 @@ object CometTPCDSMicroBenchmark extends CometTPCQueryBenchmarkBase {
benchmark.addCase(s"$name$nameSuffix") { _ =>
cometSpark.sql(queryString).noop()
}
benchmark.addCase(s"$name$nameSuffix: Comet (Scan)") { _ =>
withSQLConf(CometConf.COMET_ENABLED.key -> "true") {
cometSpark.sql(queryString).noop()
}
}
benchmark.addCase(s"$name$nameSuffix: Comet (Scan, Exec)") { _ =>
withSQLConf(
CometConf.COMET_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.addCase(s"$name$nameSuffix: Comet (Exec)") { _ =>
benchmark.addCase(s"$name$nameSuffix: Comet") { _ =>
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_EXEC_ENABLED.key -> "true",
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") {
CometConf.COMET_EXPLAIN_NATIVE_ENABLED.key -> "false") {
cometSpark.sql(queryString).noop()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,10 @@ trait CometTPCQueryBenchmarkBase extends SqlBasedBenchmark with CometTPCQueryBas
benchmark.addCase(s"$name$nameSuffix") { _ =>
cometSpark.sql(queryString).noop()
}
benchmark.addCase(s"$name$nameSuffix: Comet (Scan)") { _ =>
withSQLConf(CometConf.COMET_ENABLED.key -> "true") {
cometSpark.sql(queryString).noop()
}
}
benchmark.addCase(s"$name$nameSuffix: Comet (Scan, Exec)") { _ =>
withSQLConf(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "true",
CometConf.COMET_EXEC_SHUFFLE_ENABLED.key -> "true",
CometConf.COMET_SHUFFLE_MODE.key -> "auto") {
cometSpark.sql(queryString).noop()
}
}
benchmark.addCase(s"$name$nameSuffix: Comet (Exec)") { _ =>
benchmark.addCase(s"$name$nameSuffix: Comet") { _ =>
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") {
CometConf.COMET_EXEC_ENABLED.key -> "true") {
cometSpark.sql(queryString).noop()
}
}
Expand Down
Loading