Skip to content

refactor join-key equality filtering - #23843

Open
shehab-ali wants to merge 2 commits into
apache:mainfrom
shehab-ali:shehab/hashjoin-filter-keys
Open

refactor join-key equality filtering#23843
shehab-ali wants to merge 2 commits into
apache:mainfrom
shehab-ali:shehab/hashjoin-filter-keys

Conversation

@shehab-ali

@shehab-ali shehab-ali commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Simplified and sped up candidate-pair equality filtering by eliminating per-row type dispatch and by using a pre-built comparator that respects NullEquality semantics.

Added targeted hash-join microbenchmarks to exercise high-fanout and single hot bucket join cases with long string keys and multi column keys.

Description

Before this change, hash join probing produced candidate build/probe row-index pairs and then equal_rows_arr validated those pairs by materializing temporary key arrays, comparing those arrays, building a boolean mask, and filtering the candidate indices.

After this change, equal_rows_arr validates candidate pairs by comparing the original key arrays directly by row index using JoinKeyComparator, then appending only matching candidate indices to the output arrays. It also now checks that the input shapes are valid before doing that work.

Where This Happens in Hash Join
During hash join probing, DataFusion first asks the join hash map for candidate build/probe index pairs. Those pairs are still “candidate” matches because the hash table is based on hash values, so DataFusion must confirm that the actual join-key values are equal.

Before

For each batch of candidate pairs:

build_indices + probe_indices
  1. allocate taken build key arrays
  2. allocate taken probe key arrays
  3. allocate equality boolean arrays
  4. allocate/combine boolean masks
  5. filter index arrays

After

For each batch of candidate pairs:

build_indices + probe_indices
  1. compare build/probe rows directly
  2. append matching indices

This should particularly help workloads where:

  • many candidate pairs are produced
  • most candidate pairs are real matches
  • join keys are multi-column

Benchmark Performance

In #23980, we added new Q24 and Q25 benchmarksto make this behavior visible:

  • Q24 stresses a single hot long string key where every matching probe row fans out to the whole build side.
  • Q25 stresses a skewed composite join key with a long string component, so multi-column equality filtering is exercised.

These benchmarks are meant to show whether future changes improve this exact candidate-pair validation path which replicate the hot partition case, not just generic hash join performance.

Query main branch Change
Q24: single hot bucket, high fanout 725.4 ms 298.3 ms 2.43× faster
Q25: skewed multi-column string key 299.7 ms 139.8 ms 2.14× faster
Q3: 100K×60M dense 56.5 ms 51.9 ms 1.09× faster
Q14, Q16 - - ~1.06–1.10× faster
Q1: 25×1.5M 1.52 ms 1.76 ms 1.16× "slower" (0.24 ms; mostly noise)
Q4: 100K×60M, 10% hit 141.9 ms 153.3 ms 1.08× slower (11 ms)
Q2, Q5–Q13, Q15, Q17–Q23 (18 queries) - - no change

Testing

  • ran unit tests for the joins utilities in the physical-plan crate with cargo test and the new tests test_equal_rows_arr_filters_candidate_pairs and test_equal_rows_arr_respects_null_equality passed.

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jul 23, 2026
@codecov-commenter

codecov-commenter commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.55172% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@f33dcec). Learn more about missing BASE report.
⚠️ Report is 139 commits behind head on main.

Files with missing lines Patch % Lines
datafusion/physical-plan/src/joins/utils.rs 96.55% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #23843   +/-   ##
=======================================
  Coverage        ?   80.86%           
=======================================
  Files           ?     1101           
  Lines           ?   375002           
  Branches        ?   375002           
=======================================
  Hits            ?   303234           
  Misses          ?    53677           
  Partials        ?    18091           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shehab-ali
shehab-ali marked this pull request as ready for review July 23, 2026 20:34
@shehab-ali
shehab-ali force-pushed the shehab/hashjoin-filter-keys branch from c19467c to a7da3b0 Compare July 30, 2026 13:28

@kosiew kosiew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shehab-ali
Thanks for working on this!
I have one small suggestion that could help make this a bit more robust against future regressions.

let mut right_filtered = Vec::with_capacity(indices_right.len());

let filter_builder = FilterBuilder::new(&equal).optimize().build();
for (left, right) in indices_left.values().iter().zip(indices_right.values()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indices_left and indices_right are expected to be parallel candidate pair arrays, but this loop now uses zip, which would silently truncate if that invariant were ever broken.

Would it make sense to add a debug_assert_eq!(indices_left.len(), indices_right.len()) (or return an internal error) before the loop? That way, if a future caller accidentally violates the invariant, it will fail loudly instead of quietly dropping candidate pairs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, I added internal error for that case. Lmk if it looks good. thanks!

@alamb

alamb commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

run benchmarks hj

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5147828389-1335-4892b 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing shehab/hashjoin-filter-keys (19ad65b) to f33dcec (merge-base) diff

Run configuration
run benchmark hj

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing shehab/hashjoin-filter-keys (19ad65b) to f33dcec (merge-base) diff

Run configuration
run benchmark hj
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and shehab_hashjoin-filter-keys
--------------------
Benchmark hj.json
--------------------
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query                                                               ┃      HEAD ┃ shehab_hashjoin-filter-keys ┃        Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                               │   2.18 ms │                     1.93 ms │ +1.13x faster │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                           │   4.32 ms │                     4.15 ms │     no change │
│ QQuery 3_density=1_prob_hit=1_100K*60M                              │  85.77 ms │                    85.10 ms │     no change │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                            │ 190.58 ms │                   189.88 ms │     no change │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                           │ 698.77 ms │                   694.42 ms │     no change │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                         │ 272.63 ms │                   275.15 ms │     no change │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                            │ 694.67 ms │                   694.46 ms │     no change │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                          │ 249.01 ms │                   248.95 ms │     no change │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                            │ 711.82 ms │                   719.71 ms │     no change │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                         │ 251.81 ms │                   254.78 ms │     no change │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                           │ 699.72 ms │                   715.00 ms │     no change │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                         │ 249.34 ms │                   251.92 ms │     no change │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                          │ 726.15 ms │                   711.30 ms │     no change │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                        │ 282.26 ms │                   281.65 ms │     no change │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M              │ 258.49 ms │                   256.13 ms │     no change │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                    │   2.26 ms │                     2.40 ms │  1.06x slower │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                   │  89.04 ms │                    88.74 ms │     no change │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                 │ 102.37 ms │                   102.81 ms │     no change │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                    │   1.91 ms │                     1.89 ms │     no change │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                   │  80.26 ms │                    79.83 ms │     no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                 │ 112.26 ms │                   112.07 ms │     no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi   │  91.71 ms │                    87.51 ms │     no change │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count │ 164.66 ms │                   174.34 ms │  1.06x slower │
└─────────────────────────────────────────────────────────────────────┴───────────┴─────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 6022.01ms │
│ Total Time (shehab_hashjoin-filter-keys)   │ 6034.13ms │
│ Average Time (HEAD)                        │  261.83ms │
│ Average Time (shehab_hashjoin-filter-keys) │  262.35ms │
│ Queries Faster                             │         1 │
│ Queries Slower                             │         2 │
│ Queries with No Change                     │        20 │
│ Queries with Failure                       │         0 │
└────────────────────────────────────────────┴───────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and shehab_hashjoin-filter-keys
--------------------
Benchmark hj.json
--------------------
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query                                                               ┃                               HEAD ┃        shehab_hashjoin-filter-keys ┃        Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                               │        2.18 / 2.52 ±0.38 / 3.16 ms │        1.93 / 2.20 ±0.43 / 3.04 ms │ +1.15x faster │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                           │        4.32 / 4.52 ±0.25 / 4.95 ms │        4.15 / 4.26 ±0.07 / 4.38 ms │ +1.06x faster │
│ QQuery 3_density=1_prob_hit=1_100K*60M                              │     85.77 / 89.00 ±3.78 / 94.62 ms │     85.10 / 86.46 ±0.83 / 87.41 ms │     no change │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                            │ 190.58 / 202.53 ±19.57 / 241.60 ms │ 189.88 / 205.27 ±17.67 / 239.85 ms │     no change │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                           │  698.77 / 710.64 ±7.55 / 721.61 ms │ 694.42 / 728.10 ±30.24 / 783.60 ms │     no change │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                         │ 272.63 / 288.70 ±17.67 / 312.84 ms │ 275.15 / 290.27 ±20.40 / 329.09 ms │     no change │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                            │ 694.67 / 712.47 ±12.80 / 728.71 ms │ 694.46 / 717.37 ±14.10 / 735.61 ms │     no change │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                          │ 249.01 / 268.16 ±18.96 / 302.11 ms │ 248.95 / 261.14 ±16.30 / 293.12 ms │     no change │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                            │  711.82 / 729.81 ±9.63 / 738.31 ms │ 719.71 / 754.22 ±54.57 / 863.02 ms │     no change │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                         │ 251.81 / 276.56 ±22.28 / 305.35 ms │ 254.78 / 289.36 ±30.52 / 340.86 ms │     no change │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                           │ 699.72 / 730.75 ±17.42 / 752.96 ms │  715.00 / 726.42 ±9.37 / 739.91 ms │     no change │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                         │ 249.34 / 281.93 ±41.32 / 362.87 ms │ 251.92 / 278.61 ±16.95 / 303.15 ms │     no change │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                          │ 726.15 / 757.56 ±26.88 / 806.63 ms │ 711.30 / 738.30 ±19.55 / 767.43 ms │     no change │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                        │ 282.26 / 301.95 ±19.28 / 328.34 ms │ 281.65 / 300.70 ±12.88 / 321.52 ms │     no change │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M              │ 258.49 / 275.62 ±18.91 / 304.30 ms │ 256.13 / 278.66 ±23.44 / 312.36 ms │     no change │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                    │        2.26 / 2.52 ±0.20 / 2.89 ms │        2.40 / 2.52 ±0.10 / 2.68 ms │     no change │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                   │   89.04 / 98.57 ±16.87 / 132.28 ms │    88.74 / 96.35 ±8.56 / 109.59 ms │     no change │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                 │ 102.37 / 111.82 ±15.43 / 142.41 ms │  102.81 / 107.13 ±8.22 / 123.58 ms │     no change │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                    │        1.91 / 1.97 ±0.07 / 2.10 ms │        1.89 / 1.94 ±0.04 / 1.99 ms │     no change │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                   │     80.26 / 81.30 ±0.85 / 82.74 ms │     79.83 / 80.84 ±1.06 / 82.88 ms │     no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                 │  112.26 / 115.52 ±3.15 / 119.64 ms │  112.07 / 112.96 ±1.03 / 114.57 ms │     no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi   │     91.71 / 93.35 ±1.00 / 94.49 ms │     87.51 / 91.69 ±2.47 / 94.38 ms │     no change │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count │  164.66 / 165.60 ±0.95 / 167.35 ms │  174.34 / 174.97 ±0.51 / 175.88 ms │  1.06x slower │
└─────────────────────────────────────────────────────────────────────┴────────────────────────────────────┴────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 6303.38ms │
│ Total Time (shehab_hashjoin-filter-keys)   │ 6329.73ms │
│ Average Time (HEAD)                        │  274.06ms │
│ Average Time (shehab_hashjoin-filter-keys) │  275.21ms │
│ Queries Faster                             │         2 │
│ Queries Slower                             │         1 │
│ Queries with No Change                     │        20 │
│ Queries with Failure                       │         0 │
└────────────────────────────────────────────┴───────────┘

Resource Usage

hj — base (merge-base)

Metric Value
Wall time 35.0s
Peak memory 2.7 GiB
Avg memory 1.3 GiB
CPU user 319.8s
CPU sys 10.7s
Peak spill 0 B

hj — branch

Metric Value
Wall time 35.0s
Peak memory 2.5 GiB
Avg memory 1.3 GiB
CPU user 318.6s
CPU sys 11.0s
Peak spill 0 B

File an issue against this benchmark runner

@LiaCastaneda

LiaCastaneda commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Do you know why Q24,Q25 were not included?

│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count │ 164.66 / 165.60 ±0.95 / 167.35 ms │ 174.34 / 174.97 ±0.51 / 175.88 ms │ 1.06x slower │

Wondering if it is expected that Q23 has no perf improvement 🤔

edit: (for Q23) I think the thing that made it slow were the comparisons in equal_rows_arr -> eq_dyn_null operations (both show in the profiles for this benchmark query), and removing those showed improvements

@shehab-ali

shehab-ali commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

I tried to target the Q23 case (single column refactoring) so I did this optimization in this commit #24067 and it's looking much better.

Q24 and Q25 improvement is preserved and Q23 is ~10% faster on average

@kosiew

kosiew commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

run benchmark hj

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5174414450-1371-5nrg8 6.12.85+ #1 SMP Wed Jun 17 20:31:55 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing shehab/hashjoin-filter-keys (19ad65b) to f33dcec (merge-base) diff

Run configuration
run benchmark hj

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing shehab/hashjoin-filter-keys (19ad65b) to f33dcec (merge-base) diff

Run configuration
run benchmark hj
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and shehab_hashjoin-filter-keys
--------------------
Benchmark hj.json
--------------------
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query                                                               ┃      HEAD ┃ shehab_hashjoin-filter-keys ┃       Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                               │   1.90 ms │                     1.89 ms │    no change │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                           │   4.22 ms │                     4.12 ms │    no change │
│ QQuery 3_density=1_prob_hit=1_100K*60M                              │  86.09 ms │                    84.93 ms │    no change │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                            │ 191.29 ms │                   194.48 ms │    no change │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                           │ 710.46 ms │                   717.16 ms │    no change │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                         │ 275.74 ms │                   271.19 ms │    no change │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                            │ 722.17 ms │                   725.13 ms │    no change │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                          │ 250.77 ms │                   249.30 ms │    no change │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                            │ 707.01 ms │                   721.87 ms │    no change │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                         │ 252.38 ms │                   252.28 ms │    no change │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                           │ 718.78 ms │                   716.47 ms │    no change │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                         │ 247.45 ms │                   261.21 ms │ 1.06x slower │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                          │ 728.79 ms │                   736.11 ms │    no change │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                        │ 268.90 ms │                   287.30 ms │ 1.07x slower │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M              │ 256.63 ms │                   258.85 ms │    no change │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                    │   2.29 ms │                     2.36 ms │    no change │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                   │  88.97 ms │                    88.67 ms │    no change │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                 │ 102.35 ms │                   103.19 ms │    no change │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                    │   1.86 ms │                     1.98 ms │ 1.07x slower │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                   │  80.83 ms │                    81.54 ms │    no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                 │ 111.47 ms │                   114.29 ms │    no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi   │  87.38 ms │                    90.65 ms │    no change │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count │ 165.79 ms │                   175.29 ms │ 1.06x slower │
└─────────────────────────────────────────────────────────────────────┴───────────┴─────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 6063.52ms │
│ Total Time (shehab_hashjoin-filter-keys)   │ 6140.28ms │
│ Average Time (HEAD)                        │  263.63ms │
│ Average Time (shehab_hashjoin-filter-keys) │  266.97ms │
│ Queries Faster                             │         0 │
│ Queries Slower                             │         4 │
│ Queries with No Change                     │        19 │
│ Queries with Failure                       │         0 │
└────────────────────────────────────────────┴───────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and shehab_hashjoin-filter-keys
--------------------
Benchmark hj.json
--------------------
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query                                                               ┃                               HEAD ┃          shehab_hashjoin-filter-keys ┃       Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                               │        1.90 / 2.28 ±0.44 / 3.12 ms │          1.89 / 2.30 ±0.44 / 3.09 ms │    no change │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                           │        4.22 / 4.32 ±0.08 / 4.44 ms │          4.12 / 4.28 ±0.15 / 4.55 ms │    no change │
│ QQuery 3_density=1_prob_hit=1_100K*60M                              │     86.09 / 87.65 ±1.33 / 89.80 ms │       84.93 / 85.94 ±0.88 / 87.57 ms │    no change │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                            │  191.29 / 196.59 ±2.90 / 199.48 ms │    194.48 / 201.15 ±7.80 / 212.47 ms │    no change │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                           │ 710.46 / 728.27 ±17.28 / 757.56 ms │   717.16 / 759.59 ±42.15 / 837.45 ms │    no change │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                         │ 275.74 / 293.28 ±25.59 / 343.75 ms │   271.19 / 291.72 ±22.54 / 334.80 ms │    no change │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                            │  722.17 / 730.28 ±6.89 / 742.14 ms │    725.13 / 733.99 ±6.92 / 743.12 ms │    no change │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                          │ 250.77 / 264.67 ±14.21 / 284.63 ms │   249.30 / 265.86 ±11.81 / 281.45 ms │    no change │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                            │ 707.01 / 736.99 ±19.98 / 766.69 ms │ 721.87 / 839.47 ±140.52 / 1030.74 ms │ 1.14x slower │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                         │ 252.38 / 266.89 ±11.03 / 280.94 ms │   252.28 / 267.36 ±13.83 / 291.16 ms │    no change │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                           │ 718.78 / 735.39 ±13.24 / 754.09 ms │    716.47 / 724.25 ±7.08 / 735.16 ms │    no change │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                         │ 247.45 / 270.97 ±22.53 / 312.27 ms │   261.21 / 278.92 ±14.87 / 304.69 ms │    no change │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                          │ 728.79 / 746.79 ±18.01 / 780.79 ms │   736.11 / 796.37 ±63.14 / 915.76 ms │ 1.07x slower │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                        │ 268.90 / 313.07 ±37.66 / 369.21 ms │   287.30 / 304.71 ±14.16 / 330.39 ms │    no change │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M              │ 256.63 / 289.07 ±33.28 / 341.86 ms │   258.85 / 280.52 ±21.69 / 309.06 ms │    no change │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                    │        2.29 / 2.38 ±0.08 / 2.52 ms │          2.36 / 2.47 ±0.06 / 2.55 ms │    no change │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                   │  88.97 / 101.06 ±13.42 / 119.84 ms │     88.67 / 99.04 ±10.82 / 116.72 ms │    no change │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                 │ 102.35 / 108.68 ±12.17 / 133.03 ms │   103.19 / 109.16 ±10.52 / 130.17 ms │    no change │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                    │        1.86 / 2.00 ±0.08 / 2.07 ms │          1.98 / 2.02 ±0.05 / 2.12 ms │    no change │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                   │     80.83 / 81.35 ±0.45 / 82.10 ms │       81.54 / 82.03 ±0.43 / 82.77 ms │    no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                 │  111.47 / 113.31 ±1.37 / 115.12 ms │    114.29 / 114.93 ±0.43 / 115.44 ms │    no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi   │     87.38 / 92.24 ±2.52 / 94.17 ms │       90.65 / 92.67 ±1.72 / 95.17 ms │    no change │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count │  165.79 / 167.28 ±1.54 / 169.59 ms │    175.29 / 176.03 ±0.42 / 176.61 ms │ 1.05x slower │
└─────────────────────────────────────────────────────────────────────┴────────────────────────────────────┴──────────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 6334.82ms │
│ Total Time (shehab_hashjoin-filter-keys)   │ 6514.77ms │
│ Average Time (HEAD)                        │  275.43ms │
│ Average Time (shehab_hashjoin-filter-keys) │  283.25ms │
│ Queries Faster                             │         0 │
│ Queries Slower                             │         3 │
│ Queries with No Change                     │        20 │
│ Queries with Failure                       │         0 │
└────────────────────────────────────────────┴───────────┘

Resource Usage

hj — base (merge-base)

Metric Value
Wall time 35.0s
Peak memory 2.5 GiB
Avg memory 1.3 GiB
CPU user 324.8s
CPU sys 11.9s
Peak spill 0 B

hj — branch

Metric Value
Wall time 35.0s
Peak memory 2.8 GiB
Avg memory 1.3 GiB
CPU user 326.6s
CPU sys 11.9s
Peak spill 0 B

File an issue against this benchmark runner

@kosiew

kosiew commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@shehab-ali

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 6334.82ms │
│ Total Time (shehab_hashjoin-filter-keys)   │ 6514.77ms │
│ Average Time (HEAD)                        │  275.43ms │
│ Average Time (shehab_hashjoin-filter-keys) │  283.25ms │
│ Queries Faster                             │         0 │
│ Queries Slower                             │         3 │
│ Queries with No Change                     │        20 │
│ Queries with Failure                       │         0 │
└────────────────────────────────────────────┴───────────┘

Can you investigate why performance has regressed?

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.

6 participants