Omega359 opened a new pull request, #26210: URL: https://github.com/apache/datafusion/pull/26210
## Is your feature request related to a problem or challenge? Running a SQL benchmark with `--criterion-namespace` or `BENCH_NAMESPACE` currently requires a separate `--criterion` flag. Since namespaces apply to Criterion benchmark groups, selecting a namespace should also select Criterion mode. ## Describe the solution you'd like Enable Criterion when either namespace option is set. Apply the existing mode checks after inferring Criterion mode, so incompatible `--output` and `--iterations` options still fail and `--save-baseline` works. Print the inferred-mode notice to stderr to preserve stdout output. ## Describe alternatives you've considered Keeping the explicit `--criterion` requirement would preserve the current behavior but require callers to specify both options. ## Additional context This follows the SQL benchmark migration preparation in #24806. ## Willingness to contribute Implementation included in this draft PR. ## Which issue does this PR close? No linked issue. ## Rationale for this change Allow benchmark callers to select namespaced Criterion runs with a single option or environment variable. ## What changes are included in this PR? - Infer Criterion mode from `--criterion-namespace` and `BENCH_NAMESPACE` and update the CLI help. - Share namespace validation between the CLI and the Criterion runner. - Extend CLI tests for inferred mode, environment defaults, CLI overrides, list and dry-run behavior, conflicting options, saved baselines, and stderr notices. ## What is the testing strategy for this PR? The benchmark-runner tests exercise argument parsing and environment handling, including a subprocess test for `BENCH_NAMESPACE`. Existing tests cover invalid namespaces and distinct Criterion artifacts. Local validation: - `cargo test -p datafusion-benchmarks --bin benchmark_runner`: 62 passed. - `cargo fmt --all` and diff whitespace checks passed. - `cargo clippy --all-targets --all-features -- -D warnings`: failed with three `mutable_key_type` errors in unchanged `datafusion/optimizer/src/push_down_filter.rs` (lines 1138, 1142, and 1606). - The standard lint suite and extended workspace tests are still in progress; their results are pending. This changes CLI mode selection, not query execution performance; no performance improvement is claimed. ## Are there any user-facing changes? Yes. `--criterion-namespace` and `BENCH_NAMESPACE` now enable Criterion without an explicit `--criterion` flag. The runner reports inferred mode on stderr. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
