Skip to content

fix: use session statistics registry in dfbench reports - #25570

Open
gabotechs wants to merge 1 commit into
apache:mainfrom
gabotechs:codex/dfbench-session-statistics
Open

gabotechs wants to merge 1 commit into
apache:mainfrom
gabotechs:codex/dfbench-session-statistics

Conversation

@gabotechs

@gabotechs gabotechs commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Part of #8227.

Rationale for this change

dfbench statistics unconditionally enables built-in statistics providers, so its estimates can differ from those used by the session. In TPC-H SF1 Q14, it reports 14.73 billion rows instead of 73,650 for a join that produces 75,983 rows.

Unrelated to this PR, but it's pretty weird how the built-in providers are not actually built-in unless explicitly enabled, and it's also weird how they can override the actually built-in code in each operator producing different results. It seems like there's different pieces of code with overlapping intentions and different implementation.

What changes are included in this PR?

Capture estimates using the session's registry, matching EXPLAIN ANALYZE. An unconfigured session falls back to operator statistics.

What is the testing strategy for this PR?

  • All five existing CLI statistics tests, formatting, and all-feature Clippy pass.

Are there any user-facing changes?

CLI estimates now respect the session's statistics configuration.

@gabotechs
gabotechs marked this pull request as ready for review September 21, 2026 15:32
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.42%. Comparing base (6574a8c) to head (6c32056).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
benchmarks/src/statistics.rs 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25570      +/-   ##
==========================================
- Coverage   82.42%   82.42%   -0.01%     
==========================================
  Files        1138     1139       +1     
  Lines      435501   435362     -139     
  Branches   435501   435362     -139     
==========================================
- Hits       358955   358827     -128     
+ Misses      54841    54831      -10     
+ Partials    21705    21704       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asolimando asolimando left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

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.

3 participants