Repository navigation
Commit eacdf75
authored
Add benchmarks for hashjoin candidate equality filtering (#23980)
## Which issue does this PR close?
- Part of #23237.
## Rationale for this change
Issue #23237 identifies hash join candidate equality filtering as a
potential
performance bottleneck. Before changing that implementation, we need
stable
benchmarks that reproduce the relevant workloads and let us measure the
effect
of a proposed optimization independently.
The existing hash join benchmark suite covers high-fanout joins, but it
does
not isolate these two cases:
1. A single hot hash bucket in which all build-side rows use the same
long
string key.
2. A skewed composite-key join in which candidate pairs must be checked
across
multiple key columns.
This PR intentionally adds only the benchmarks. The implementation
change for
`equal_rows_arr` will be submitted separately so that the benchmark
workloads
can be reviewed and established independently of the optimization.
## What changes are included in this PR?
This PR adds two hash join benchmarks:
- **Q24: single-hot-bucket long string-key join**
- Creates 3,000 build-side rows with the same long string key.
- Selects matching probe-side rows that use that same key.
- Causes every selected probe row to fan out across the entire
build-side
bucket.
- Uses `count(*)` so the benchmark emphasizes hash match and candidate
equality processing without materializing and retaining the full joined
output.
- **Q25: skewed composite-key join**
- Uses an integer key and a long string key.
- Distributes the build-side integer key over 256 values while all
selected
probe rows use one value.
- Produces a high-fanout set of candidate matches for one integer-key
value.
- Requires the second string-key column to be checked as part of
composite
join-key equality.
- Uses `count(*)` to focus the measurement on the join match path.
Both benchmarks:
- Assert that the input data is available.
- Assert that the physical plan contains `HashJoinExec`.
- Use the no-statistics configuration and force Partitioned hash join
mode.
- Are registered in the `hj` benchmark runner with descriptive
build/probe
metadata.
- Can be used to compare the existing implementation against the
follow-up
optimization for #23237.
## Are these changes tested?
No hash join implementation is changed by this PR.
## Are there any user-facing changes?
No.1 parent 64bc392 commit eacdf75
3 files changed
Lines changed: 110 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
475 | 521 | | |
476 | 522 | | |
477 | 523 | | |
| |||
0 commit comments