Skip to content

bench: add benchmarks for first_value, last_value#21409

Merged
alamb merged 2 commits intoapache:mainfrom
theirix:bench-first_last
Apr 7, 2026
Merged

bench: add benchmarks for first_value, last_value#21409
alamb merged 2 commits intoapache:mainfrom
theirix:bench-first_last

Conversation

@theirix
Copy link
Copy Markdown
Contributor

@theirix theirix commented Apr 6, 2026

Which issue does this PR close?

Rationale for this change

Spin-off of #21383 to have a bench for First_Value, Last_Value available before a PR with logic change.

What changes are included in this PR?

  • Add benchmark for GroupsAccumulator. It's pretty complicated to test aggregates with grouping, since many operations are stateful, so I introduced end-to-end evaluate test (to actually test taking state) and convert_to_state (as in other benches)
  • A bench for a simple Accumulator

Are these changes tested?

  • Manual bench run

Are there any user-facing changes?

@github-actions github-actions bot added the functions Changes to functions implementation label Apr 6, 2026
@theirix theirix changed the title Add bench for first_last bench: add benchmarks for first_value, last_value Apr 6, 2026
@theirix theirix marked this pull request as ready for review April 6, 2026 16:12
@alamb
Copy link
Copy Markdown
Contributor

alamb commented Apr 7, 2026

Thank you @theirix

@alamb alamb added this pull request to the merge queue Apr 7, 2026
Merged via the queue into apache:main with commit c73b6e1 Apr 7, 2026
35 checks passed
Dandandan pushed a commit to Dandandan/arrow-datafusion that referenced this pull request Apr 8, 2026
## Which issue does this PR close?

## Rationale for this change

Spin-off of apache#21383 to have a bench for `First_Value`, `Last_Value`
available before a PR with logic change.

## What changes are included in this PR?

- Add benchmark for `GroupsAccumulator`. It's pretty complicated to test
aggregates with grouping, since many operations are stateful, so I
introduced end-to-end evaluate test (to actually test taking state) and
convert_to_state (as in other benches)
- A bench for a simple `Accumulator`

## Are these changes tested?

- Manual bench run

## Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->

<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants