alamb opened a new pull request, #7060: URL: https://github.com/apache/arrow-datafusion/pull/7060
Draft as it builds on https://github.com/apache/arrow-datafusion/pull/7054 # Which issue does this PR close? closes https://github.com/apache/arrow-datafusion/issues/6994 <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> # Rationale for this change see https://github.com/apache/arrow-datafusion/issues/6994 -- tldr is to optimize clickbench type queries it needs to be easier to run them # What changes are included in this PR? 1. Add new `dfbench clickbench` command to run ClickBench queries 2. Update `bench.sh` to run clickbench queries 3. Update benchmark documentation # Are these changes tested? I tested them manually Run clickbench q1 directly (e.g. for profiling): ```shell cargo run --bin dfbench -- clickbench --query 1 Running benchmarks with the following options: RunOpt { query: Some(1), common: CommonOpt { iterations: 3, partitions: 2, batch_size: 8192 }, path: "benchmarks/data/hits.parquet", queries_path: "benchmarks/queries/clickbench/queries.sql", output_path: None } Q1: SELECT COUNT(*) FROM hits; Query 1 iteration 0 took 305.7 ms and returned 1 rows Query 1 iteration 1 took 13.6 ms and returned 1 rows Query 1 iteration 2 took 13.6 ms and returned 1 rows ``` run with hits_partitioned (100 parquet files): ```shell cargo run --bin dfbench -- clickbench --query 1 --path=benchmarks/data/hits_partitioned ``` Run with bench.sh: ```shell ./bench.sh run clickbench_1 ``` See help ```shell cargo run --bin dfbench -- clickbench --help dfbench-clickbench 27.0.0 Run the clickbench benchmark The ClickBench[1] benchmarks are widely cited in the industry and focus on grouping / aggregation / filtering. This runner uses the scripts and queries from [2]. [1]: https://github.com/ClickHouse/ClickBench [2]: https://github.com/ClickHouse/ClickBench/tree/main/datafusion USAGE: dfbench clickbench [OPTIONS] FLAGS: -h, --help Prints help information -V, --version Prints version information OPTIONS: -s, --batch-size <batch-size> Batch size when reading CSV or Parquet files [default: 8192] -i, --iterations <iterations> Number of iterations of each test run [default: 3] -o, --output <output-path> If present, write results json here -n, --partitions <partitions> Number of partitions to process in parallel [default: 2] -p, --path <path> Path to hits.parquet (single file) or `hits_partitioned` (partitioned, 100 files) [default: benchmarks/data/hits.parquet] -r, --queries_path <queries-path> Path to queries.sql (single file) [default: benchmarks/queries/clickbench/queries.sql] -q, --query <query> Query number. If not specified, runs all queries ``` # Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
