Skip to content

Commit

Permalink
chore: Fix NPE when running CometTPCHQueriesList directly
Browse files Browse the repository at this point in the history
  • Loading branch information
advancedxy committed Apr 18, 2024
1 parent 4da74d8 commit 9f0c762
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ object CometTPCHQueriesList extends CometTPCQueryListBase with CometTPCQueryBase

// List of all TPC-H queries
val tpchQueries = (1 to 22).map(n => s"q$n")
// Only q1 in the extended queries
val tpchExtendedQueries = Seq("q1")

// If `--query-filter` defined, filters the queries that this option selects
val queries = filterQueries(tpchQueries, benchmarkArgs.queryFilter)
val extendedQueries = filterQueries(tpchExtendedQueries, benchmarkArgs.queryFilter)

if (queries.isEmpty) {
throw new RuntimeException(
Expand All @@ -63,6 +66,6 @@ object CometTPCHQueriesList extends CometTPCQueryListBase with CometTPCQueryBase
setupCBO(cometSpark, benchmarkArgs.cboEnabled, tables)

runQueries("tpch", queries, " TPCH Snappy")
runQueries("tpch-extended", queries, " TPCH Extended Snappy")
runQueries("tpch-extended", extendedQueries, " TPCH Extended Snappy")
}
}

0 comments on commit 9f0c762

Please sign in to comment.