-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Sql benchmark sync updated queries #24583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Omega359
wants to merge
4
commits into
apache:main
Choose a base branch
from
Omega359:sql_benchmark_sync_updated_queries
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f318368
feat: synchronize SQL benchmark query inventories
Omega359 ec9807f
Merge branch 'main' into sql_benchmark_sync_updated_queries
Omega359 e8116e5
Merge branch 'main' into sql_benchmark_sync_updated_queries
Omega359 f934bed
Add some missing h2o benchmarks, removed unnecessary tests from sql_b…
Omega359 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
benchmarks/sql_benchmarks/clickbench_extended/benchmarks/q13.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name Q13 | ||
| group clickbench_extended | ||
| subgroup ${CLICKBENCH_TYPE:-single} | ||
|
|
||
| init sql_benchmarks/clickbench/init/set_config.sql | ||
|
|
||
| load sql_benchmarks/clickbench/init/load-${CLICKBENCH_TYPE:-single}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 from hits; | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| SELECT SUM("CounterID") AS counter_id_sum | ||
| FROM hits | ||
| WHERE "URL" < 'zzzz'; | ||
|
|
||
| result sql_benchmarks/clickbench_extended/results/q13.csv |
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q13.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q13 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (ROW_NUMBER top-2 per partition) | ||
| SELECT id2, largest2_v2 FROM ( | ||
| SELECT id2, v2 AS largest2_v2, | ||
| ROW_NUMBER() OVER (PARTITION BY id2 ORDER BY v2 DESC) AS order_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE order_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q13.csv |
26 changes: 26 additions & 0 deletions
26
benchmarks/sql_benchmarks/h2o/benchmarks/window/q14.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| subgroup window | ||
|
|
||
| name Q14 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N partition cardinality sweep (id3 % N gives N distinct partitions). | ||
| -- These exercise PartitionedTopKExec across cardinalities to validate it stays | ||
| -- competitive with the SortExec+Filter baseline as partition count grows. | ||
| -- Window Top-N: 100 partitions | ||
| SELECT pk, largest2_v2 FROM ( | ||
| SELECT id3 % 100 AS pk, v2 AS largest2_v2, | ||
| ROW_NUMBER() OVER (PARTITION BY id3 % 100 ORDER BY v2 DESC) AS order_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE order_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q14.csv | ||
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q15.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q15 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N: 1,000 partitions | ||
| SELECT pk, largest2_v2 FROM ( | ||
| SELECT id3 % 1000 AS pk, v2 AS largest2_v2, | ||
| ROW_NUMBER() OVER (PARTITION BY id3 % 1000 ORDER BY v2 DESC) AS order_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE order_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q15.csv |
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q16.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q16 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N: 10,000 partitions | ||
| SELECT pk, largest2_v2 FROM ( | ||
| SELECT id3 % 10000 AS pk, v2 AS largest2_v2, | ||
| ROW_NUMBER() OVER (PARTITION BY id3 % 10000 ORDER BY v2 DESC) AS order_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE order_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q16.csv |
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q17.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q17 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N: 100,000 partitions | ||
| SELECT pk, largest2_v2 FROM ( | ||
| SELECT id3 % 100000 AS pk, v2 AS largest2_v2, | ||
| ROW_NUMBER() OVER (PARTITION BY id3 % 100000 ORDER BY v2 DESC) AS order_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE order_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q17.csv |
27 changes: 27 additions & 0 deletions
27
benchmarks/sql_benchmarks/h2o/benchmarks/window/q18.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| subgroup window | ||
|
|
||
| name Q18 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (RANK top-2 per partition, ~100 partitions) | ||
| -- The RANK queries below mirror the ROW_NUMBER cardinality sweep | ||
| -- above and add heavy-ties variants. RANK semantics retain boundary | ||
| -- ties (`WHERE rk <= K` may keep more than K rows per partition), so | ||
| -- this exercises PartitionedTopKRank's ties-Vec path. | ||
| SELECT pk, largest_v2 FROM ( | ||
| SELECT (id3 % 100) AS pk, v2 AS largest_v2, | ||
| RANK() OVER (PARTITION BY (id3 % 100) ORDER BY v2 DESC) AS rk_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE rk_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q18.csv |
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q19.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q19 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (RANK top-2 per partition, ~1K partitions) | ||
| SELECT pkey, largest_v2 FROM ( | ||
| SELECT (id3 % 1000) AS pkey, v2 AS largest_v2, | ||
| RANK() OVER (PARTITION BY (id3 % 1000) ORDER BY v2 DESC) AS rk_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE rk_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q19.csv |
25 changes: 25 additions & 0 deletions
25
benchmarks/sql_benchmarks/h2o/benchmarks/window/q20.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| subgroup window | ||
|
|
||
| name Q20 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (RANK top-2 per partition, ~1K partitions, heavy ties) | ||
| -- v2 % 10 forces 10 distinct OBY values, so most rows tie at the boundary | ||
| -- and exercise PartitionedTopKRank's ties-Vec path. | ||
| SELECT pkey, largest_v2 FROM ( | ||
| SELECT (id3 % 1000) AS pkey, v2 AS largest_v2, | ||
| RANK() OVER (PARTITION BY (id3 % 1000) ORDER BY (v2 % 10) DESC) AS rk_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE rk_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q20.csv |
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q21.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q21 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (RANK top-2 per partition, ~10K partitions, low ties) | ||
| SELECT id2, largest_v2 FROM ( | ||
| SELECT id2, v2 AS largest_v2, | ||
| RANK() OVER (PARTITION BY id2 ORDER BY v2 DESC) AS rk_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE rk_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q21.csv |
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q22.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q22 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (RANK top-2 per partition, ~10K partitions, heavy ties) | ||
| SELECT id2, largest_v2 FROM ( | ||
| SELECT id2, v2 AS largest_v2, | ||
| RANK() OVER (PARTITION BY id2 ORDER BY (v2 % 10) DESC) AS rk_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE rk_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q22.csv |
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q23.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q23 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (RANK top-2 per partition, ~100K partitions) | ||
| SELECT pk, largest_v2 FROM ( | ||
| SELECT (id3 % 100000) AS pk, v2 AS largest_v2, | ||
| RANK() OVER (PARTITION BY (id3 % 100000) ORDER BY v2 DESC) AS rk_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE rk_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q23.csv |
28 changes: 28 additions & 0 deletions
28
benchmarks/sql_benchmarks/h2o/benchmarks/window/q24.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| subgroup window | ||
|
|
||
| name Q24 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (DENSE_RANK top-2 per partition, ~100 partitions) | ||
| -- The DENSE_RANK queries below mirror the RANK cardinality sweep above. | ||
| -- DENSE_RANK semantics keep every row whose ORDER BY value is among the | ||
| -- K distinct-greatest values in the partition, so total kept per partition | ||
| -- is unbounded in rows-per-distinct-value — exercises PartitionedTopKDenseRank's | ||
| -- HashMap-of-groups path. | ||
| SELECT pk, largest_v2 FROM ( | ||
| SELECT (id3 % 100) AS pk, v2 AS largest_v2, | ||
| DENSE_RANK() OVER (PARTITION BY (id3 % 100) ORDER BY v2 DESC) AS dr_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE dr_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q24.csv |
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q25.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q25 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (DENSE_RANK top-2 per partition, ~1K partitions) | ||
| SELECT pkey, largest_v2 FROM ( | ||
| SELECT (id3 % 1000) AS pkey, v2 AS largest_v2, | ||
| DENSE_RANK() OVER (PARTITION BY (id3 % 1000) ORDER BY v2 DESC) AS dr_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE dr_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q25.csv |
26 changes: 26 additions & 0 deletions
26
benchmarks/sql_benchmarks/h2o/benchmarks/window/q26.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| subgroup window | ||
|
|
||
| name Q26 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (DENSE_RANK top-2 per partition, ~1K partitions, heavy ties) | ||
| -- v2 % 10 forces 10 distinct OBY values; most rows share the top-2 distinct | ||
| -- values so appends dominate — exercises the "Case A" append-to-existing-Vec | ||
| -- fast path in PartitionedTopKDenseRank. | ||
| SELECT pkey, largest_v2 FROM ( | ||
| SELECT (id3 % 1000) AS pkey, v2 AS largest_v2, | ||
| DENSE_RANK() OVER (PARTITION BY (id3 % 1000) ORDER BY (v2 % 10) DESC) AS dr_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE dr_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q26.csv |
23 changes: 23 additions & 0 deletions
23
benchmarks/sql_benchmarks/h2o/benchmarks/window/q27.benchmark
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| subgroup window | ||
|
|
||
| name Q27 | ||
| group h2o | ||
|
|
||
| echo Loading ${H2O_BENCH_SIZE:-small} window ${H2O_FILE_TYPE:-csv} h2o data | ||
|
|
||
| load sql_benchmarks/h2o/init/load_window_${H2O_BENCH_SIZE:-small}_${H2O_FILE_TYPE:-csv}.sql | ||
|
|
||
| assert I | ||
| SELECT COUNT(*) > 0 FROM x | ||
| ---- | ||
| true | ||
|
|
||
| run | ||
| -- Window Top-N (DENSE_RANK top-2 per partition, ~10K partitions, low ties) | ||
| SELECT id2, largest_v2 FROM ( | ||
| SELECT id2, v2 AS largest_v2, | ||
| DENSE_RANK() OVER (PARTITION BY id2 ORDER BY v2 DESC) AS dr_v2 | ||
| FROM x WHERE v2 IS NOT NULL | ||
| ) sub_query WHERE dr_v2 <= 2; | ||
|
|
||
| result sql_benchmarks/h2o/results/window/${H2O_BENCH_SIZE:-small}/q27.csv |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since none of q13–q29 set it in
init, I think these all run theSortExec + FilterExecbaseline rather than thePartitionedTopKExecpath?