Skip to content

bench: add simplify_function_over_case benchmark - #24489

Merged
kosiew merged 2 commits into
apache:mainfrom
radmirnovii:bench-simplify-function-over-case
Sep 1, 2026
Merged

bench: add simplify_function_over_case benchmark#24489
kosiew merged 2 commits into
apache:mainfrom
radmirnovii:bench-simplify-function-over-case

Conversation

@radmirnovii

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Spin-off of #24477: have a benchmark for f(CASE-of-literals) simplification
and evaluation available before the PR with the rule, to compare against main.

What changes are included in this PR?

A new simplify_function_over_case Criterion benchmark for
datafusion-optimizer: simplify/{2,8,32} (plan-time simplifier cost over N
literal branches) and evaluate_8192_rows (per-batch evaluation after the
standard simplification pipeline). Measurement coverage only; no behavior change.

Are these changes tested?

Yes: the benchmark compiles and runs on main
(cargo bench -p datafusion-optimizer --bench simplify_function_over_case);
fmt and clippy pass.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the optimizer Optimizer rules label Aug 19, 2026
@radmirnovii
radmirnovii marked this pull request as ready for review August 19, 2026 12:53
@radmirnovii
radmirnovii force-pushed the bench-simplify-function-over-case branch from 90b19cf to d929db0 Compare August 19, 2026 13:45
@codecov-commenter

codecov-commenter commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.39%. Comparing base (6cc3442) to head (c83c2d0).
⚠️ Report is 52 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24489      +/-   ##
==========================================
- Coverage   81.39%   81.39%   -0.01%     
==========================================
  Files        1118     1118              
  Lines      398692   398692              
  Branches   398692   398692              
==========================================
- Hits       324525   324518       -7     
- Misses      55198    55205       +7     
  Partials    18969    18969              

☔ 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.

@radmirnovii
radmirnovii force-pushed the bench-simplify-function-over-case branch from d929db0 to c83c2d0 Compare August 24, 2026 13:23

@kosiew kosiew 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.

@radmirnovii,

Thanks for adding this benchmark ahead of the optimizer change. The setup looks useful for comparing the current behavior against the follow-up rule, and I don't see anything blocking here.

I left a couple of optional suggestions around making the evaluation benchmark a bit easier to interpret and compare.

Comment thread datafusion/optimizer/benches/simplify_function_over_case.rs
Comment thread datafusion/optimizer/benches/simplify_function_over_case.rs
@radmirnovii

Copy link
Copy Markdown
Contributor Author

Thanks for the review.

@kosiew

kosiew commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🚀
@radmirnovii
Thank you for your contribution.

@kosiew
kosiew added this pull request to the merge queue Sep 1, 2026
Merged via the queue into apache:main with commit 58ef566 Sep 1, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimizer Optimizer rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants