Skip to content

bench: add FixedSizeBinary coverage to multi_group_by benchmark#23650

Open
alamb wants to merge 1 commit into
apache:mainfrom
alamb:bench-fsb-multi-group-by
Open

bench: add FixedSizeBinary coverage to multi_group_by benchmark#23650
alamb wants to merge 1 commit into
apache:mainfrom
alamb:bench-fsb-multi-group-by

Conversation

@alamb

@alamb alamb commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The point of a specialized FixedSizeBinary group values is performance but we have no performance benchmark for it.

What changes are included in this PR?

Adds a fixed_size_binary experiment to
datafusion/physical-plan/benches/multi_group_by.rs
Run with:

cargo bench -p datafusion-physical-plan --bench multi_group_by --features test_utils -- fixed_size_binary

Are these changes tested?

This is benchmark-only. The benchmark compiles on main and runs end-to-end
on top of #23646. No product code changes.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jul 16, 2026

@Rich-T-kid Rich-T-kid 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.

LGTM

nit: may want to varyFSB_WIDTH between benchmarks but this could also bloat the benchmarks

@alamb alamb marked this pull request as draft July 16, 2026 19:15
Adds a `fixed_size_binary` experiment to the multi_group_by benchmark that
groups on a `(FixedSizeBinary(16), Int32)` key, comparing the vectorized
columnar path (`GroupValuesColumn`) against the row-based fallback
(`GroupValuesRows`) at 1,000 and 1,000,000 distinct groups.

The distinct FixedSizeBinary values come from arrow-rs's `create_fsb_array`
benchmark generator; rows cycle through that pool to control cardinality (as
`generate_batches` does for Int32). Enabling `bench_util` requires the
`test_utils` feature, so the bench entry now declares it.

This gives coverage for the `FixedSizeBinaryGroupValueBuilder`: before
FixedSizeBinary support, such a schema fell back to `GroupValuesRows`, so the
`vectorized` vs `row_based` comparison measures the columnar speedup directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alamb alamb force-pushed the bench-fsb-multi-group-by branch from 36fa31d to da9f529 Compare July 16, 2026 19:25
@alamb

alamb commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

LGTM

nit: may want to varyFSB_WIDTH between benchmarks but this could also bloat the benchmarks

Thank you @Rich-T-kid -- I agree that the varying FSB_WIDTH would bloat things -- I think using FSB 16 (what is used for uuids) is probably a good enough coverage until we have a real usecase for a diffferent size

@alamb alamb marked this pull request as ready for review July 16, 2026 19:34
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@a29f70c). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #23650   +/-   ##
=======================================
  Coverage        ?   80.65%           
=======================================
  Files           ?     1086           
  Lines           ?   366396           
  Branches        ?   366396           
=======================================
  Hits            ?   295508           
  Misses          ?    53269           
  Partials        ?    17619           

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

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

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants