Skip to content

feat(benchmarks): add plan diagnostics to SQL benchmark runners - #26212

Open
Omega359 wants to merge 4 commits into
apache:mainfrom
Omega359:sql-benchmark-plan-diagnostics
Open

Omega359 wants to merge 4 commits into
apache:mainfrom
Omega359:sql-benchmark-plan-diagnostics

Conversation

@Omega359

@Omega359 Omega359 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

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 test as written to cover the new diagnostic information. A sample of benchmarks were run with and without the diagnostics to verify they worked.

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.

… plan information when debug is enabled. This is preliminary work prior to adding sort_pushdown benchmarks to sql benchmarks.
@Omega359
Omega359 marked this pull request as ready for review October 12, 2026 02:39

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alamb
alamb enabled auto-merge October 12, 2026 18:13
@alamb

alamb commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

I merged up from main -- the Ci failure seems unrelated to this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants