Skip to content
Open
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 @@ -97,8 +97,8 @@ trait CometBenchmarkBase
}

/**
* Runs an expression benchmark with standard cases: Spark, Comet (Scan), Comet (Scan + Exec).
* This provides a consistent benchmark structure for expression evaluation.
* Runs an expression benchmark with standard cases: Spark, Comet. This provides a consistent
* benchmark structure for expression evaluation.
*
* @param name
* Benchmark name
Expand All @@ -107,7 +107,7 @@ trait CometBenchmarkBase
* @param query
* SQL query to benchmark
* @param extraCometConfigs
* Additional configurations to apply for Comet cases (optional)
* Additional configurations to apply for the Comet case (optional)
*/
final def runExpressionBenchmark(
name: String,
Expand All @@ -122,14 +122,6 @@ trait CometBenchmarkBase
}
}

benchmark.addCase("Comet (Scan)") { _ =>
withSQLConf(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "false") {
spark.sql(query).noop()
}
}

val cometExecConfigs = Map(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "true",
Expand Down Expand Up @@ -158,7 +150,7 @@ trait CometBenchmarkBase
}
}

benchmark.addCase("Comet (Scan + Exec)") { _ =>
benchmark.addCase("Comet") { _ =>
withSQLConf(cometExecConfigs.toSeq: _*) {
spark.sql(query).noop()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import org.apache.comet.CometConf
* @param query
* SQL query to benchmark
* @param extraCometConfigs
* Additional Comet configurations for the scan+exec case
* Additional Comet configurations for the Comet case
*/
case class CsvExprConfig(
name: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,7 @@ object CometExecBenchmark extends CometBenchmarkBase {
spark.sql("select c2 + 1, c1 + 2 from parquetV1Table where c1 + 1 > 0").noop()
}

benchmark.addCase("SQL Parquet - Comet (Scan)") { _ =>
withSQLConf(CometConf.COMET_ENABLED.key -> "true") {
spark.sql("select c2 + 1, c1 + 2 from parquetV1Table where c1 + 1 > 0").noop()
}
}

benchmark.addCase("SQL Parquet - Comet (Scan, Exec)") { _ =>
benchmark.addCase("SQL Parquet - Comet") { _ =>
withSQLConf(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "true") {
Expand Down Expand Up @@ -128,15 +122,7 @@ object CometExecBenchmark extends CometBenchmarkBase {
"col2, col3 FROM parquetV1Table")
}

benchmark.addCase("SQL Parquet - Comet (Scan)") { _ =>
withSQLConf(CometConf.COMET_ENABLED.key -> "true") {
spark.sql(
"SELECT (SELECT max(col1) AS parquetV1Table FROM parquetV1Table) AS a, " +
"col2, col3 FROM parquetV1Table")
}
}

benchmark.addCase("SQL Parquet - Comet (Scan, Exec)") { _ =>
benchmark.addCase("SQL Parquet - Comet") { _ =>
withSQLConf(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "true",
Expand Down Expand Up @@ -164,13 +150,7 @@ object CometExecBenchmark extends CometBenchmarkBase {
spark.sql("select * from parquetV1Table").sortWithinPartitions("value").noop()
}

benchmark.addCase("SQL Parquet - Comet (Scan)") { _ =>
withSQLConf(CometConf.COMET_ENABLED.key -> "true") {
spark.sql("select * from parquetV1Table").sortWithinPartitions("value").noop()
}
}

benchmark.addCase("SQL Parquet - Comet (Scan, Exec)") { _ =>
benchmark.addCase("SQL Parquet - Comet") { _ =>
withSQLConf(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "true") {
Expand Down Expand Up @@ -199,16 +179,7 @@ object CometExecBenchmark extends CometBenchmarkBase {
.noop()
}

benchmark.addCase("SQL Parquet - Comet (Scan)") { _ =>
withSQLConf(CometConf.COMET_ENABLED.key -> "true") {
spark
.sql("SELECT col1, col2, SUM(col3) FROM parquetV1Table " +
"GROUP BY col1, col2 GROUPING SETS ((col1), (col2))")
.noop()
}
}

benchmark.addCase("SQL Parquet - Comet (Scan, Exec)") { _ =>
benchmark.addCase("SQL Parquet - Comet") { _ =>
withSQLConf(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "true") {
Expand Down Expand Up @@ -251,13 +222,7 @@ object CometExecBenchmark extends CometBenchmarkBase {
spark.sql(query).noop()
}

benchmark.addCase("SQL Parquet - Comet (Scan) (BloomFilterAgg)") { _ =>
withSQLConf(CometConf.COMET_ENABLED.key -> "true") {
spark.sql(query).noop()
}
}

benchmark.addCase("SQL Parquet - Comet (Scan, Exec) (BloomFilterAgg)") { _ =>
benchmark.addCase("SQL Parquet - Comet (BloomFilterAgg)") { _ =>
withSQLConf(
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "true") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.apache.comet.CometConf
* @param query
* SQL query to benchmark
* @param extraCometConfigs
* Additional Comet configurations for the scan+exec case
* Additional Comet configurations for the Comet case
*/
case class JsonExprConfig(
name: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import org.apache.comet.CometConf
* @param query
* SQL query to benchmark
* @param extraCometConfigs
* Additional Comet configurations for the scan+exec case
* Additional Comet configurations for the Comet case
*/
case class StringExprConfig(
name: String,
Expand Down
Loading