Skip to content

bench: add standard window function cases to bounded_window - #24151

Open
neilconway wants to merge 1 commit into
apache:mainfrom
neilconway:neilc/bench-window-standard-fns
Open

bench: add standard window function cases to bounded_window#24151
neilconway wants to merge 1 commit into
apache:mainfrom
neilconway:neilc/bench-window-standard-fns

Conversation

@neilconway

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The bounded_window benchmark only covered aggregate window expressions (count and sum). Window functions such as row_number, rank, lag, lead, and nth_value go through a different code path, for which we had no benchmark coverage.

Add four new benchmark cases:

  • linear dense row_number 10000 partitions: per-visit fixed costs on partitions that receive rows in every batch.
  • linear sparse row_number 32768 partitions: per-batch work on quiet partitions dominates.
  • linear sparse lead 32768 partitions: a non-causal function, whose result for the last buffered row of a partition stays pending until that partition receives another row.
  • linear dense rank 10000 partitions: an evaluator that compares ORDER BY values row by row.

Also rename the existing case names to be consistent.

What changes are included in this PR?

  • Add 4 new benchmark cases covering standard (non-agg) window functions
  • Refactor window benchmark code to enable this
  • Rename benchmark case names to be mutually consistent

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@neilconway
neilconway force-pushed the neilc/bench-window-standard-fns branch from 4b6f383 to 2de376d Compare August 6, 2026 22:03
@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Aug 6, 2026
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.

1 participant