Skip to content

Commit f716c27

Browse files
committed
feat: Added prefer_round_robin for clickbench_partitioned
1 parent 3a83352 commit f716c27

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

benchmarks/bench.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ run_clickbench_partitioned() {
481481
RESULTS_FILE="${RESULTS_DIR}/clickbench_partitioned.json"
482482
echo "RESULTS_FILE: ${RESULTS_FILE}"
483483
echo "Running clickbench (partitioned, 100 files) benchmark..."
484-
$CARGO_COMMAND --bin dfbench -- clickbench --iterations 5 --path "${DATA_DIR}/hits_partitioned" --queries-path "${SCRIPT_DIR}/queries/clickbench/queries.sql" -o "${RESULTS_FILE}"
484+
$CARGO_COMMAND --bin dfbench -- clickbench --iterations 5 --path "${DATA_DIR}/hits_partitioned" --prefer_round_robin "${PREFER_ROUND_ROBIN}" --queries-path "${SCRIPT_DIR}/queries/clickbench/queries.sql" -o "${RESULTS_FILE}"
485485
}
486486

487487
# Runs the clickbench "extended" benchmark with a single large parquet file

benchmarks/src/clickbench.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ use datafusion_common::exec_datafusion_err;
2727
use datafusion_common::instant::Instant;
2828
use structopt::StructOpt;
2929

30+
// hack to avoid `default_value is meaningless for bool` errors
31+
type BoolDefaultTrue = bool;
32+
3033
/// Run the clickbench benchmark
3134
///
3235
/// The ClickBench[1] benchmarks are widely cited in the industry and
@@ -68,6 +71,11 @@ pub struct RunOpt {
6871
/// If present, write results json here
6972
#[structopt(parse(from_os_str), short = "o", long = "output")]
7073
output_path: Option<PathBuf>,
74+
75+
/// If true then round robin repartitioning is used, if false then on demand repartitioning
76+
/// True by default.
77+
#[structopt(short = "r", long = "prefer_round_robin", default_value = "true")]
78+
prefer_round_robin: BoolDefaultTrue,
7179
}
7280

7381
struct AllQueries {

0 commit comments

Comments
 (0)