Omega359 opened a new pull request, #26212: URL: https://github.com/apache/datafusion/pull/26212
## Which issue does this PR close? - Part of #21706. ## Rationale for this change The native sort-pushdown benchmark can print query plans and execution metrics, but SQL benchmarks do not provide equivalent diagnostics. Preserve that capability in the shared SQL harness before migrating the sort-pushdown benchmarks. ## What changes are included in this PR? - Use the existing `--debug` / `DEBUG` option to print logical, optimized logical, physical, and post-execution metric plans for SQL benchmark run queries. - Support both the simple and Criterion runners, including buffered execution used for result persistence and validation. - Retain the executed physical plan so the reported metrics come from that execution. Buffered execution reuses the same plan for validation and collection. ## What is the testing strategy for this PR? A subprocess regression test checks debug enabled and disabled for simple, Criterion, and buffered execution. It verifies all four diagnostic sections and populated execution metrics (`output_rows=3`). The subprocess environment is cleared to isolate it from other CLI tests. Validation: - `cargo test --profile ci -p datafusion-benchmarks --lib --bin benchmark_runner`: 212 tests passed. - `./dev/rust_lint.sh`. - Extended workspace tests passed during implementation. - Manual simple-runner execution with `--debug` and direct SQL Criterion harness execution with `DEBUG=true` both produced all four diagnostic sections and populated metrics. ## Are there any user-facing changes? SQL benchmarks now emit plan diagnostics when `--debug` or `DEBUG=true` is enabled. Diagnostics are disabled by default. As with the native benchmark, diagnostic output occurs during execution and affects measured timings. -- 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]
