bench(h2o): window Top-N sweep over a declared-sorted input - #24732
Open
SubhamSinghal wants to merge 1 commit into
Open
bench(h2o): window Top-N sweep over a declared-sorted input#24732SubhamSinghal wants to merge 1 commit into
SubhamSinghal wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24732 +/- ##
==========================================
- Coverage 81.42% 81.42% -0.01%
==========================================
Files 1120 1120
Lines 402021 402021
Branches 402021 402021
==========================================
- Hits 327357 327351 -6
- Misses 55484 55488 +4
- Partials 19180 19182 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Related to #6899 — adds benchmark coverage for the WindowTopN operators.
Rationale for this change
The existing
h2o --subgroup windowTop-N sweep (q13–q29) registersxwith no declared ordering, sooutput_ordering()isNone. Any plan that depends on the input being sorted is unreachable from those queries, however the data happens to be laid out on disk. This adds awindow_sortedsubgroup that publishes the same sweep over aWITH ORDERtable, so ordering-dependent plans can be measured.What changes are included in this PR?
A
window_sortedh2o subgroup: 16 queries covering ROW_NUMBER / RANK / DENSE_RANK × 100 / 1K / 10K / 100K partitions, plus heavy-ties variants.Two
loaddirectives: the existingload_window_${SIZE}_${FORMAT}.sqlcreatesx, then a new script writes a sorted copy viaCOPY (... ORDER BY pk, ob DESC)and registers itWITH ORDER (pk ASC, ob DESC). Reusing the existing loader keeps both the--sizeand--formataxes working with no duplication.loadis untimed, so the sort stays out of the measurement.WITH ORDERcan only name columns, so the partition key (id3 % N) and the tie expression are materialized aspkandob.Asserts guard the three ways this could silently measure nothing: both config flags took effect, the sorted copy holds every source row, and
obhas the cardinality the query name claims.expect_plan PartitionedTopKExecis deliberately the shared substring, so the same file validates the heap operator and any streaming variant that replaces it.No Rust changes; benchmark files only.
Are these changes tested?
benchmark_runner h2o --subgroup window_sortedruns all 16 queries green. Row counts are exact: 2 per partition for the distinct-ORDER-BY shapes, and 1,010,812 (RANK) / 2,020,722 (DENSE_RANK) for the tie shapes — the top-1 and top-2 of 10 distinct values over 10M rows.Are there any user-facing changes?
No.