Skip to content

refactor: Rewrite Hash Join's regular (inner/left/right/full) join path - #27399

Merged
2010YOUY01 merged 10 commits into
apache:mainfrom
2010YOUY01:refactor-hj-regular-stream
Nov 20, 2026
Merged

2010YOUY01 merged 10 commits into
apache:mainfrom
2010YOUY01:refactor-hj-regular-stream

Conversation

@2010YOUY01

@2010YOUY01 2010YOUY01 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR close?

Step 1 toward:

Part of:

Rationale for this change

This PR is step 1 of #27398, a structural cleanup of Hash Join to prepare for #27401 (physical HT redesign, with 8 queries in the hj benchmark achieving >3x speedups).

The goal is to make Hash Join easier to understand, review, and optimize. This PR focuses on the execution structure without changing the physical hash table representation.

Why the cleanup?

The existing Hash Join implementation has two major architectural issues:

  1. Regular and existence joins share the same execution path. It's better to split them to support logic/optimizations specific to each.

  2. Everything is mixed into one layer. Low-level physical operations are mixed with high-level execution control flow. This makes PRs hard to review: even a change that only touches one layer can appear to be a deep architectural change.

The ideal design has three layers (see #27398):

RegularHashJoinStream   (execution state machine)
          |
BatchedJoinProcessor   (lookup -> filter -> output)
          |
JoinIndexMap            (physical hash table / index)

This PR establishes the first two layers. The JoinIndexMap abstraction and physical redesign are deferred to #27401.

For deeper rationale, see:

What changes are included in this PR?

There are only two key points to understand this PR:

  1. Split out the regular Hash Join execution path (Inner/Left/Right/Full joins).

    • This is an incremental migration: the existing implementation is preserved as a fallback.
    • Existence joins continue using the existing path. Once both paths have been migrated, the old implementation can be removed.
  2. Establish BatchedJoinProcessor as the main execution layer.

    • See the code comments for details.
    • This separation makes execution control flow easier to reason about independently of the low-level lookup implementation.

Suggested review order

It's easier to read the diff in this order:

  1. Migration configuration: enable_migration_hash_join. When true, regular joins use the new path; otherwise, they use the existing implementation. Existence joins always use the existing path. The option defaults to true, since the new path covers the existing regular-join functionality.

    It's planned to keep it for just one release to guard against major bugs, as we did in #22710.

  2. Execution state machine: datafusion/physical-plan/src/joins/hash_join/regular_join.rs. Start with RegularHashJoinStream::into_stream, which is the entry point for the entire execution.

  3. Main execution layer: datafusion/physical-plan/src/joins/hash_join/batched_join_processor.rs. Start with the documentation on BatchedJoinProcessor, which explains its responsibilities and input/output contract with a concrete example.

  4. ...and follow along.

What is the testing strategy for this PR?

Existing tests are reused. Major join fuzz tests are exercised with both enable_migration_hash_join=true and enable_migration_hash_join=false to cover the new and legacy implementations during migration.

Are there any user-facing changes?

This PR adds datafusion.execution.enable_migration_hash_join (default: true). It enables the refactored implementation for inner, left, right, and full hash joins. Setting it to false restores the legacy implementation as a temporary workaround for bugs.

See issue for details: #26361

The option and legacy fallback will be removed once the migration is complete; the current plan is to retain them for one release.

@github-actions github-actions Bot added documentation Improvements or additions to documentation core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) common Related to common crate physical-plan Changes to the physical-plan crate labels Nov 13, 2026

/// Immutable build buffers and their durable reservation.
struct JoinBuildData {
pub(super) struct JoinBuildData {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Some notes about structs related to build-side data, as this PR introduces extra complexity on this part:

The final shape split left-side data into RegularJoinLeftData and ExistenceJoinLeftData, with JoinBuildData as the common inner part. (better to split since some fields are only specific to one path)

This PR only migrates regular joins, requiring temporary indirection:

CollectedBuild → RegularJoinLeftData / JoinLeftData

After migration, we can remove CollectedBuild and replace legacy JoinLeftData with ExistenceJoinLeftData to keep it simple.

/// completion to the processor.
/// - `Outputting -> end`: Buffered output and any final unmatched build rows
/// have been emitted.
pub(super) fn into_stream(self) -> SendableRecordBatchStream {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the execution entry point.

/// next_output_batch() -> Output([(1, NULL)])
/// next_output_batch() -> Finished // All output from this processor is drained.
/// ```
pub(super) struct BatchedJoinProcessor {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the key struct that establishes a layer inside HJ.

@2010YOUY01
2010YOUY01 force-pushed the refactor-hj-regular-stream branch from 7c30bde to b93c3dd Compare November 16, 2026 11:54
@2010YOUY01

Copy link
Copy Markdown
Member Author

This PR replaces #26227. The main difference is that it is now step 1 toward a concrete optimization, rather than just preparing for future optimizations (see rationale for details). I hope this can make the review easier.

CC reviewers in the origin PR: @jayzhan211 @mbutrovich @andygrove

@jayzhan211 jayzhan211 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.

@2010YOUY01 thanks for splitting this out! The new path returned the same rows as the legacy one on everything I tried: the join fuzz tests, the join .slt files under both flag values, and about 1,300 extra queries covering all four join types, residual filters, IS NOT DISTINCT FROM, dictionary keys, empty inputs, both partition modes, batch sizes 1/2/8192 and LIMIT.

The one change I'd ask for before merging is the probe-hit counting loop (inline), which makes hj Q24 and Q26 6-12% slower. The other comments are optional.

Comment on lines +389 to +397
// Equality pairs are ordered by probe row. A row continuing from the
// previous chunk contributes fanout, but not another probe hit.
let mut matched_probe_rows = 0;
for &row in probe_indices.values().iter() {
if probe.last_probe_row_with_key_match != Some(row) {
matched_probe_rows += 1;
probe.last_probe_row_with_key_match = Some(row);
}
}

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.

This loop makes the new path slower than the legacy one on hj (sf1, same binary, toggling enable_migration_hash_join): Q24 is 1.06x and Q26 is 1.12x, while Q17, which the flag doesn't touch, stays at 1.01x. A profile puts the extra time here: the field is read and written through &mut on every row. The legacy path's count_distinct_sorted_indices plus a first/last boundary fix brings Q24 to 1.00x and Q26 to 1.04x, and join_probe_metrics_count_each_probe_row_once still passes. This also needs count_distinct_sorted_indices in stream.rs made pub(super) and imported here.

Suggested change
// Equality pairs are ordered by probe row. A row continuing from the
// previous chunk contributes fanout, but not another probe hit.
let mut matched_probe_rows = 0;
for &row in probe_indices.values().iter() {
if probe.last_probe_row_with_key_match != Some(row) {
matched_probe_rows += 1;
probe.last_probe_row_with_key_match = Some(row);
}
}
// Equality pairs are ordered by probe row. A row continuing from the
// previous chunk contributes fanout, but not another probe hit.
let mut matched_probe_rows = count_distinct_sorted_indices(&probe_indices);
if let (Some(&first), Some(&last)) = (
probe_indices.values().first(),
probe_indices.values().last(),
) {
if Some(first) == probe.last_probe_row_with_key_match {
matched_probe_rows -= 1;
}
probe.last_probe_row_with_key_match = Some(last);
}
Per-query numbers (new/legacy, median of 60 runs)
query PR with this change
Q24 single hot bucket, string key 1.063 1.000
Q26 Partitioned, dense keys 1.119 1.040
Q9 0.995 1.019
Q13 0.964 0.953
Q17 RightSemi (control) 1.007 1.021

@2010YOUY01 2010YOUY01 Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch, addressed in 282a10f
I'll validate the full benchmark result later.

Comment on lines +285 to +288
if self.output.push_batch(batch)? == PushBatchStatus::LimitReached {
self.release_probe();
self.phase = Phase::DrainingOutput;
}

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.

Optional: no test covers this early stop. If release_probe() and the move to DrainingOutput are removed, every test still passes, but the join reads the whole probe input after fetch rows. The test below makes the second probe batch an error, so it fails without the early stop for all four join types.

Test for exec.rs tests module
/// Reaching `fetch` stops reading the probe side: the second probe batch
/// is an error that must never be polled.
#[rstest]
#[tokio::test]
async fn join_fetch_stops_reading_probe(
    #[values(JoinType::Inner, JoinType::Left, JoinType::Right, JoinType::Full)]
    join_type: JoinType,
) -> Result<()> {
    let left = build_table(
        ("a1", &vec![1, 2, 3]),
        ("b1", &vec![1, 2, 3]),
        ("c1", &vec![7, 8, 9]),
    );
    let right_batch = build_table_i32(
        ("a2", &vec![1, 2, 3]),
        ("b1", &vec![1, 2, 3]),
        ("c2", &vec![4, 5, 6]),
    );
    let right_schema = right_batch.schema();
    let on = vec![(
        Arc::new(Column::new_with_schema("b1", &left.schema())?) as _,
        Arc::new(Column::new_with_schema("b1", &right_schema)?) as _,
    )];
    let right: Arc<dyn ExecutionPlan> = Arc::new(
        MockExec::new(
            vec![Ok(right_batch), exec_err!("probe read after fetch")],
            right_schema,
        )
        .with_use_task(false)
        .with_unknown_statistics(),
    );
    let join = HashJoinExecBuilder::new(left, right, on, join_type)
        .with_partition_mode(PartitionMode::CollectLeft)
        .with_fetch(Some(2))
        .build()?;
    let batches =
        common::collect(join.execute(0, prepare_task_ctx(8192, false))?).await?;
    assert_eq!(batches.iter().map(|b| b.num_rows()).sum::<usize>(), 2);
    Ok(())
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a mutation testing failure: removing two lines of execution code should cause a test to fail, but all tests still pass.

I feel that adding a test specifically for this case would be a bit overfitted and hard to maintain, so I'd prefer to skip it. Perhaps we could improve our fuzzers to make similar cases covered instead 🤔

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.

Perhaps we could improve our fuzzers to make similar cases covered instead

A fuzzer that compares outputs can't catch this one. Without the early stop, the join still returns exactly fetch rows, because LimitedBatchCoalescer::push_batch drops everything pushed after the limit. The only difference is that the probe input keeps getting read to the end, and that doesn't show up in any output. join_fuzz.rs also never sets fetch.

The test @jayzhan211 posted checks the operator's contract through its public API: once fetch rows are out, the probe input is never polled again. It doesn't touch BatchedJoinProcessor internals, so it should survive #27401 unchanged. Could we add it? Without it, losing the early stop in a later refactor would make every LIMIT over a hash join read its whole probe side, and no test would notice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You're right, I was thinking of it as something else.

In 3f417b8, I've implemented the same test goal with slt -- removing those two lines will fail the added slt test case

Comment on lines +1809 to +1819
let use_regular = if let Some(prepared) = &self.prepared_build {
// Public join fields can change after builder validation.
prepared.validate(self)?;
prepared.is_regular()
} else {
context
.session_config()
.options()
.execution
.enable_migration_hash_join
};

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.

Optional cleanup: if this uses the consumer's config for prepared builds too, enable_migration_hash_join = false also works as the bug workaround for prepared consumers. Today a long-lived prepared build keeps whichever path was set at preparation. Both left-data constructors only borrow the same Arc<JoinBuildData>, so nothing depends on the choice being made at preparation. This removes PreparedHashJoinBuild::regular, is_regular, and the doc lines about it, and all join tests pass with the flag's default set to either value.

-        let use_regular = if let Some(prepared) = &self.prepared_build {
+        if let Some(prepared) = &self.prepared_build {
             // Public join fields can change after builder validation.
             prepared.validate(self)?;
-            prepared.is_regular()
-        } else {
-            context
-                .session_config()
-                .options()
-                .execution
-                .enable_migration_hash_join
-        };
+        }
+        let use_regular = context
+            .session_config()
+            .options()
+            .execution
+            .enable_migration_hash_join;

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.

Today a long-lived prepared build keeps whichever path was set at preparation.

This choice is also written into public docs. The PreparedHashJoinBuild docs and the prepare_build rustdoc now say that preparation picks the executor for every consumer, whatever the consumer's enable_migration_hash_join is. That makes a temporary option part of the contract of a public type and method, and both paragraphs have to change again when the option is removed. Reading the flag in execute keeps the option out of the prepared-build API, so I'd make this change in this PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point, fixed in ef96c9b

It ensured prepared build is compatible regardless of enable_migration_hash_join is true/false, and added a unit test for it.

Comment on lines +1894 to +1896
return plan_err!(
"PartitionMode::Auto must be resolved before execution"
);

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.

Optional: the legacy branch below reports this case as "Invalid HashJoinExec, unsupported PartitionMode Auto in execute()". Using the same message keeps the error independent of the migration flag.

Suggested change
return plan_err!(
"PartitionMode::Auto must be resolved before execution"
);
return plan_err!(
"Invalid HashJoinExec, unsupported PartitionMode {:?} in execute()",
PartitionMode::Auto
);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@mbutrovich
mbutrovich self-requested a review November 16, 2026 14:38

@mbutrovich mbutrovich 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.

@2010YOUY01 thanks for reworking this as step 1 of #27398. I traced the new path against the legacy HashJoinStream (unmatched build emission, right/full alignment across chunks, the dynamic filter report, and the empty-map cases) and found it equivalent. Breaking the last-partition check in RegularJoinLeftData::finish_probe or the last_probe_row_with_on_match update makes existing exec.rs tests fail, so those paths are covered.

/// the migration is complete.
///
/// See <https://github.com/apache/datafusion/issues/26361> for details.
pub enable_migration_hash_join: bool, default = true

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.

This adds a user-facing config option, datafusion.execution.enable_migration_hash_join, which shows up in information_schema.df_settings, SHOW ALL, and configs.md. The PR description answers "Are there any user-facing changes?" with "No". Could you list the option there, with its default and the plan to remove it? The description becomes the squash commit message, so that's where users will look for it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍🏼 Updated the PR description.

Comment on lines +160 to +162
PartitionMode::Auto => {
unreachable!("PartitionMode::Auto must be resolved before execution")
}

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.

prepare already returns Result, so this invariant violation can be an internal error instead of a panic. execute rejects Auto before it builds a HashJoinBuild today, and an error keeps a future caller that skips that check from bringing down the process. This also needs internal_err added to the datafusion_common import on line 15.

Suggested change
PartitionMode::Auto => {
unreachable!("PartitionMode::Auto must be resolved before execution")
}
PartitionMode::Auto => {
return internal_err!(
"PartitionMode::Auto must be resolved before execution"
);
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@2010YOUY01

Copy link
Copy Markdown
Member Author

run benchmark tpch10 hj tpcds

@2010YOUY01

2010YOUY01 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

@jayzhan211 and @mbutrovich Thank you for the review! I've addressed all the existing comments.

Next, I'll rerun and verify the benchmark.
UPDATE: benchmark results are good

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c6949539668-5282-dr4mm 6.12.105+ #1 SMP Sat Sep 19 07:55:25 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 refactor-hj-regular-stream (ef96c9b) to 1200494 (merge-base) diff

Run configuration
run benchmark tpch10

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c6949539668-5283-v5zgr 6.12.105+ #1 SMP Sat Sep 19 07:55:25 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 refactor-hj-regular-stream (ef96c9b) to 1200494 (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 running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c6949539668-5284-gtvbr 6.12.105+ #1 SMP Sat Sep 19 07:55:25 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 refactor-hj-regular-stream (ef96c9b) to 1200494 (merge-base) diff

Run configuration
run benchmark tpcds

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 refactor-hj-regular-stream (ef96c9b) to 1200494 (merge-base) diff

Run configuration
run benchmark tpch10
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 refactor-hj-regular-stream
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃      HEAD ┃ refactor-hj-regular-stream ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │ 331.43 ms │                  330.26 ms │ no change │
│ QQuery 2  │  89.01 ms │                   90.33 ms │ no change │
│ QQuery 3  │ 219.26 ms │                  216.49 ms │ no change │
│ QQuery 4  │ 114.21 ms │                  114.31 ms │ no change │
│ QQuery 5  │ 343.77 ms │                  345.86 ms │ no change │
│ QQuery 6  │ 100.60 ms │                  101.01 ms │ no change │
│ QQuery 7  │ 445.09 ms │                  446.53 ms │ no change │
│ QQuery 8  │ 355.43 ms │                  354.62 ms │ no change │
│ QQuery 9  │ 509.18 ms │                  503.98 ms │ no change │
│ QQuery 10 │ 284.90 ms │                  284.55 ms │ no change │
│ QQuery 11 │  61.82 ms │                   61.67 ms │ no change │
│ QQuery 12 │ 117.83 ms │                  119.11 ms │ no change │
│ QQuery 13 │ 302.11 ms │                  306.70 ms │ no change │
│ QQuery 14 │ 170.65 ms │                  169.05 ms │ no change │
│ QQuery 15 │ 300.15 ms │                  302.13 ms │ no change │
│ QQuery 16 │  63.60 ms │                   63.64 ms │ no change │
│ QQuery 17 │ 582.28 ms │                  591.57 ms │ no change │
│ QQuery 18 │ 426.10 ms │                  417.36 ms │ no change │
│ QQuery 19 │ 232.65 ms │                  231.35 ms │ no change │
│ QQuery 20 │ 266.16 ms │                  266.86 ms │ no change │
│ QQuery 21 │ 662.03 ms │                  664.66 ms │ no change │
│ QQuery 22 │  59.89 ms │                   62.60 ms │ no change │
└───────────┴───────────┴────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 6038.15ms │
│ Total Time (refactor-hj-regular-stream)   │ 6044.64ms │
│ Average Time (HEAD)                       │  274.46ms │
│ Average Time (refactor-hj-regular-stream) │  274.76ms │
│ Queries Faster                            │         0 │
│ Queries Slower                            │         0 │
│ Queries with No Change                    │        22 │
│ Queries with Failure                      │         0 │
└───────────────────────────────────────────┴───────────┘

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

Comparing HEAD and refactor-hj-regular-stream
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                               HEAD ┃         refactor-hj-regular-stream ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │  331.43 / 333.34 ±2.21 / 337.62 ms │  330.26 / 331.99 ±1.00 / 333.08 ms │ no change │
│ QQuery 2  │     89.01 / 90.63 ±1.80 / 93.93 ms │     90.33 / 91.84 ±1.51 / 93.93 ms │ no change │
│ QQuery 3  │  219.26 / 222.61 ±1.92 / 225.02 ms │  216.49 / 218.28 ±3.03 / 224.33 ms │ no change │
│ QQuery 4  │  114.21 / 115.36 ±0.73 / 116.51 ms │  114.31 / 116.29 ±2.20 / 120.33 ms │ no change │
│ QQuery 5  │  343.77 / 353.68 ±6.90 / 362.74 ms │  345.86 / 350.28 ±3.39 / 353.95 ms │ no change │
│ QQuery 6  │  100.60 / 102.43 ±2.59 / 107.56 ms │  101.01 / 103.77 ±2.82 / 108.83 ms │ no change │
│ QQuery 7  │  445.09 / 452.09 ±6.76 / 464.12 ms │  446.53 / 454.75 ±6.65 / 465.35 ms │ no change │
│ QQuery 8  │  355.43 / 359.08 ±2.87 / 362.41 ms │  354.62 / 361.67 ±4.65 / 366.04 ms │ no change │
│ QQuery 9  │ 509.18 / 533.66 ±22.35 / 568.75 ms │ 503.98 / 527.17 ±23.15 / 571.38 ms │ no change │
│ QQuery 10 │  284.90 / 294.96 ±7.54 / 308.17 ms │ 284.55 / 301.96 ±13.09 / 320.98 ms │ no change │
│ QQuery 11 │     61.82 / 64.95 ±5.46 / 75.85 ms │     61.67 / 62.91 ±1.33 / 65.30 ms │ no change │
│ QQuery 12 │  117.83 / 122.76 ±5.62 / 132.70 ms │  119.11 / 126.70 ±9.09 / 140.91 ms │ no change │
│ QQuery 13 │  302.11 / 310.40 ±4.58 / 315.95 ms │ 306.70 / 319.51 ±10.10 / 330.98 ms │ no change │
│ QQuery 14 │  170.65 / 175.67 ±6.47 / 187.07 ms │  169.05 / 175.90 ±6.39 / 186.36 ms │ no change │
│ QQuery 15 │  300.15 / 302.52 ±2.08 / 305.81 ms │  302.13 / 306.50 ±4.70 / 315.18 ms │ no change │
│ QQuery 16 │     63.60 / 68.49 ±7.00 / 81.78 ms │     63.64 / 65.54 ±1.79 / 68.54 ms │ no change │
│ QQuery 17 │  582.28 / 591.19 ±8.39 / 606.06 ms │  591.57 / 597.57 ±5.04 / 603.97 ms │ no change │
│ QQuery 18 │  426.10 / 434.79 ±5.80 / 442.81 ms │ 417.36 / 433.27 ±12.09 / 452.05 ms │ no change │
│ QQuery 19 │ 232.65 / 244.08 ±13.23 / 265.17 ms │ 231.35 / 239.83 ±13.13 / 265.83 ms │ no change │
│ QQuery 20 │  266.16 / 274.59 ±5.85 / 284.19 ms │  266.86 / 274.64 ±6.27 / 285.84 ms │ no change │
│ QQuery 21 │  662.03 / 669.57 ±5.86 / 678.53 ms │  664.66 / 671.86 ±5.78 / 680.13 ms │ no change │
│ QQuery 22 │     59.89 / 63.53 ±2.42 / 66.98 ms │     62.60 / 64.09 ±1.95 / 67.88 ms │ no change │
└───────────┴────────────────────────────────────┴────────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 6180.37ms │
│ Total Time (refactor-hj-regular-stream)   │ 6196.34ms │
│ Average Time (HEAD)                       │  280.93ms │
│ Average Time (refactor-hj-regular-stream) │  281.65ms │
│ Queries Faster                            │         0 │
│ Queries Slower                            │         0 │
│ Queries with No Change                    │        22 │
│ Queries with Failure                      │         0 │
└───────────────────────────────────────────┴───────────┘

Resource Usage

tpch10 — base (merge-base)

Metric Value
Wall time 35.0s
Peak memory 3.8 GiB
Avg memory 1.3 GiB
CPU user 313.4s
CPU sys 18.0s
Peak spill 0 B

tpch10 — branch

Metric Value
Wall time 35.0s
Peak memory 3.7 GiB
Avg memory 1.3 GiB
CPU user 312.6s
CPU sys 18.2s
Peak spill 0 B

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 refactor-hj-regular-stream (ef96c9b) to 1200494 (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 refactor-hj-regular-stream
--------------------
Benchmark hj.json
--------------------
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query                                                                         ┃      HEAD ┃ refactor-hj-regular-stream ┃        Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                                         │   2.13 ms │                    2.05 ms │     no change │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                                     │   5.04 ms │                    4.72 ms │ +1.07x faster │
│ QQuery 3_density=1_prob_hit=1_100K*60M                                        │  85.30 ms │                   83.83 ms │     no change │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                                      │ 219.02 ms │                  217.00 ms │     no change │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                                     │ 843.82 ms │                  835.93 ms │     no change │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                                   │ 305.12 ms │                  305.46 ms │     no change │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                                      │ 839.04 ms │                  864.47 ms │     no change │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                                    │ 279.85 ms │                  279.61 ms │     no change │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                                      │ 855.59 ms │                  843.83 ms │     no change │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                                   │ 287.24 ms │                  279.98 ms │     no change │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                                     │ 849.58 ms │                  845.69 ms │     no change │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                                   │ 287.00 ms │                  286.94 ms │     no change │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                                    │ 895.65 ms │                  900.04 ms │     no change │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                                  │ 364.09 ms │                  325.08 ms │ +1.12x faster │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M                        │ 296.56 ms │                  289.38 ms │     no change │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                              │   2.78 ms │                    2.70 ms │     no change │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                             │  89.01 ms │                   87.12 ms │     no change │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                           │ 106.15 ms │                  106.67 ms │     no change │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                              │   1.97 ms │                    2.08 ms │  1.06x slower │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                             │  79.52 ms │                   77.65 ms │     no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                           │ 115.75 ms │                  116.33 ms │     no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi             │  90.91 ms │                   90.83 ms │     no change │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count           │ 164.48 ms │                  163.47 ms │     no change │
│ QQuery 24_density=1_prob_hit=1_3K_(single_hot_bucket)*20K_long_keys_count     │ 531.91 ms │                  529.11 ms │     no change │
│ QQuery 25_density=1_prob_hit=1_20K_(fanout~78_multi_key)*240K_multi_key_count │ 217.01 ms │                  218.34 ms │     no change │
│ QQuery 26_density=1_prob_hit=0.027_270K_dense_keys*15M                        │  58.64 ms │                   58.16 ms │     no change │
│ QQuery 27_density=0.027_prob_hit=0.027_270K_sparse_keys*15M                   │  70.57 ms │                   71.36 ms │     no change │
└───────────────────────────────────────────────────────────────────────────────┴───────────┴────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 7943.73ms │
│ Total Time (refactor-hj-regular-stream)   │ 7887.83ms │
│ Average Time (HEAD)                       │  294.21ms │
│ Average Time (refactor-hj-regular-stream) │  292.14ms │
│ Queries Faster                            │         2 │
│ Queries Slower                            │         1 │
│ Queries with No Change                    │        24 │
│ Queries with Failure                      │         0 │
└───────────────────────────────────────────┴───────────┘

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

Comparing HEAD and refactor-hj-regular-stream
--------------------
Benchmark hj.json
--------------------
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query                                                                         ┃                               HEAD ┃         refactor-hj-regular-stream ┃        Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                                         │        2.13 / 2.54 ±0.55 / 3.62 ms │        2.05 / 2.51 ±0.57 / 3.61 ms │     no change │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                                     │        5.04 / 5.18 ±0.16 / 5.49 ms │        4.72 / 5.01 ±0.16 / 5.22 ms │     no change │
│ QQuery 3_density=1_prob_hit=1_100K*60M                                        │     85.30 / 86.18 ±0.99 / 88.00 ms │     83.83 / 84.82 ±0.59 / 85.59 ms │     no change │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                                      │  219.02 / 227.06 ±7.20 / 237.66 ms │  217.00 / 222.44 ±5.75 / 232.97 ms │     no change │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                                     │ 843.82 / 869.86 ±20.94 / 905.25 ms │ 835.93 / 866.22 ±15.55 / 880.29 ms │     no change │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                                   │ 305.12 / 338.26 ±23.35 / 366.71 ms │ 305.46 / 334.68 ±22.34 / 363.14 ms │     no change │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                                      │ 839.04 / 881.86 ±50.98 / 978.55 ms │ 864.47 / 896.75 ±37.48 / 970.31 ms │     no change │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                                    │ 279.85 / 300.08 ±17.63 / 330.12 ms │ 279.61 / 313.72 ±27.51 / 343.95 ms │     no change │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                                      │ 855.59 / 897.96 ±23.58 / 920.16 ms │ 843.83 / 863.89 ±10.51 / 873.95 ms │     no change │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                                   │ 287.24 / 308.73 ±20.92 / 340.88 ms │ 279.98 / 314.91 ±51.75 / 417.47 ms │     no change │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                                     │ 849.58 / 866.18 ±13.72 / 886.87 ms │ 845.69 / 867.09 ±19.04 / 898.22 ms │     no change │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                                   │ 287.00 / 318.63 ±26.06 / 362.52 ms │ 286.94 / 323.68 ±33.99 / 372.18 ms │     no change │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                                    │ 895.65 / 924.10 ±21.02 / 958.83 ms │ 900.04 / 949.84 ±36.09 / 989.33 ms │     no change │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                                  │ 364.09 / 418.42 ±41.98 / 486.22 ms │ 325.08 / 370.27 ±30.52 / 418.00 ms │ +1.13x faster │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M                        │ 296.56 / 323.27 ±23.16 / 356.85 ms │ 289.38 / 331.25 ±33.35 / 376.97 ms │     no change │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                              │        2.78 / 2.98 ±0.27 / 3.52 ms │        2.70 / 2.81 ±0.15 / 3.10 ms │ +1.06x faster │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                             │   89.01 / 97.73 ±15.09 / 127.85 ms │     87.12 / 88.75 ±1.26 / 90.44 ms │ +1.10x faster │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                           │ 106.15 / 113.07 ±12.84 / 138.72 ms │ 106.67 / 118.56 ±13.97 / 136.57 ms │     no change │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                              │        1.97 / 2.17 ±0.23 / 2.61 ms │        2.08 / 2.26 ±0.12 / 2.46 ms │     no change │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                             │     79.52 / 81.55 ±1.34 / 83.19 ms │     77.65 / 78.75 ±0.97 / 80.51 ms │     no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                           │  115.75 / 119.08 ±4.04 / 127.02 ms │  116.33 / 117.19 ±0.49 / 117.80 ms │     no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi             │     90.91 / 92.74 ±0.99 / 93.67 ms │     90.83 / 91.64 ±0.41 / 91.95 ms │     no change │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count           │  164.48 / 164.95 ±0.33 / 165.47 ms │  163.47 / 164.11 ±0.65 / 165.34 ms │     no change │
│ QQuery 24_density=1_prob_hit=1_3K_(single_hot_bucket)*20K_long_keys_count     │  531.91 / 537.25 ±5.47 / 547.18 ms │  529.11 / 532.08 ±2.28 / 535.18 ms │     no change │
│ QQuery 25_density=1_prob_hit=1_20K_(fanout~78_multi_key)*240K_multi_key_count │  217.01 / 218.08 ±0.99 / 219.77 ms │  218.34 / 218.95 ±0.74 / 220.35 ms │     no change │
│ QQuery 26_density=1_prob_hit=0.027_270K_dense_keys*15M                        │     58.64 / 58.97 ±0.28 / 59.34 ms │     58.16 / 58.94 ±0.80 / 60.14 ms │     no change │
│ QQuery 27_density=0.027_prob_hit=0.027_270K_sparse_keys*15M                   │     70.57 / 71.80 ±0.74 / 72.54 ms │     71.36 / 72.10 ±0.55 / 72.67 ms │     no change │
└───────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────┴────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 8328.69ms │
│ Total Time (refactor-hj-regular-stream)   │ 8293.23ms │
│ Average Time (HEAD)                       │  308.47ms │
│ Average Time (refactor-hj-regular-stream) │  307.16ms │
│ Queries Faster                            │         3 │
│ Queries Slower                            │         0 │
│ Queries with No Change                    │        24 │
│ Queries with Failure                      │         0 │
└───────────────────────────────────────────┴───────────┘

Resource Usage

hj — base (merge-base)

Metric Value
Wall time 45.0s
Peak memory 2.2 GiB
Avg memory 1.2 GiB
CPU user 391.3s
CPU sys 15.1s
Peak spill 0 B

hj — branch

Metric Value
Wall time 45.0s
Peak memory 2.6 GiB
Avg memory 1.2 GiB
CPU user 380.8s
CPU sys 14.7s
Peak spill 0 B

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 refactor-hj-regular-stream (ef96c9b) to 1200494 (merge-base) diff

Run configuration
run benchmark tpcds
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 refactor-hj-regular-stream
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃ refactor-hj-regular-stream ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │    6.65 ms │                    6.34 ms │     no change │
│ QQuery 2  │   84.10 ms │                   82.77 ms │     no change │
│ QQuery 3  │   30.45 ms │                   30.69 ms │     no change │
│ QQuery 4  │  572.99 ms │                  551.10 ms │     no change │
│ QQuery 5  │   55.53 ms │                   54.56 ms │     no change │
│ QQuery 6  │   40.03 ms │                   39.19 ms │     no change │
│ QQuery 7  │   75.80 ms │                   75.04 ms │     no change │
│ QQuery 8  │   40.04 ms │                   38.46 ms │     no change │
│ QQuery 9  │   57.92 ms │                   55.77 ms │     no change │
│ QQuery 10 │   64.08 ms │                   62.24 ms │     no change │
│ QQuery 11 │  360.79 ms │                  336.88 ms │ +1.07x faster │
│ QQuery 12 │   33.67 ms │                   34.15 ms │     no change │
│ QQuery 13 │  122.53 ms │                  119.38 ms │     no change │
│ QQuery 14 │  400.72 ms │                  392.43 ms │     no change │
│ QQuery 15 │   70.50 ms │                   65.05 ms │ +1.08x faster │
│ QQuery 16 │    7.49 ms │                    6.78 ms │ +1.11x faster │
│ QQuery 17 │   83.20 ms │                   79.36 ms │     no change │
│ QQuery 18 │  120.14 ms │                  114.48 ms │     no change │
│ QQuery 19 │   45.15 ms │                   43.11 ms │     no change │
│ QQuery 20 │   43.57 ms │                   37.90 ms │ +1.15x faster │
│ QQuery 21 │   18.66 ms │                   18.15 ms │     no change │
│ QQuery 22 │   77.82 ms │                   76.47 ms │     no change │
│ QQuery 23 │  353.25 ms │                  337.56 ms │     no change │
│ QQuery 24 │  230.68 ms │                  214.94 ms │ +1.07x faster │
│ QQuery 25 │  115.70 ms │                  109.11 ms │ +1.06x faster │
│ QQuery 26 │   49.90 ms │                   48.25 ms │     no change │
│ QQuery 27 │    5.87 ms │                    5.62 ms │     no change │
│ QQuery 28 │   65.41 ms │                   60.58 ms │ +1.08x faster │
│ QQuery 29 │   99.63 ms │                   96.66 ms │     no change │
│ QQuery 30 │   37.29 ms │                   35.95 ms │     no change │
│ QQuery 31 │  118.38 ms │                  112.58 ms │     no change │
│ QQuery 32 │   22.79 ms │                   21.81 ms │     no change │
│ QQuery 33 │   40.61 ms │                   38.34 ms │ +1.06x faster │
│ QQuery 34 │    6.55 ms │                    6.01 ms │ +1.09x faster │
│ QQuery 35 │   83.13 ms │                   76.17 ms │ +1.09x faster │
│ QQuery 36 │    6.84 ms │                    5.96 ms │ +1.15x faster │
│ QQuery 37 │    8.35 ms │                    7.32 ms │ +1.14x faster │
│ QQuery 38 │   71.94 ms │                   64.33 ms │ +1.12x faster │
│ QQuery 39 │   83.27 ms │                   78.11 ms │ +1.07x faster │
│ QQuery 40 │   26.13 ms │                   25.25 ms │     no change │
│ QQuery 41 │   14.59 ms │                   14.12 ms │     no change │
│ QQuery 42 │   25.74 ms │                   25.58 ms │     no change │
│ QQuery 43 │    5.69 ms │                    5.13 ms │ +1.11x faster │
│ QQuery 44 │    6.59 ms │                    6.08 ms │ +1.08x faster │
│ QQuery 45 │   49.62 ms │                   44.30 ms │ +1.12x faster │
│ QQuery 46 │   13.29 ms │                   13.18 ms │     no change │
│ QQuery 47 │  282.42 ms │                  263.01 ms │ +1.07x faster │
│ QQuery 48 │   96.71 ms │                   97.57 ms │     no change │
│ QQuery 49 │   77.72 ms │                   72.87 ms │ +1.07x faster │
│ QQuery 50 │   60.89 ms │                   58.20 ms │     no change │
│ QQuery 51 │   95.81 ms │                   99.35 ms │     no change │
│ QQuery 52 │   26.53 ms │                   25.79 ms │     no change │
│ QQuery 53 │   32.25 ms │                   30.27 ms │ +1.07x faster │
│ QQuery 54 │   59.28 ms │                   55.33 ms │ +1.07x faster │
│ QQuery 55 │   25.82 ms │                   25.45 ms │     no change │
│ QQuery 56 │   41.90 ms │                   41.68 ms │     no change │
│ QQuery 57 │  190.71 ms │                  177.85 ms │ +1.07x faster │
│ QQuery 58 │  112.50 ms │                  113.19 ms │     no change │
│ QQuery 59 │  126.95 ms │                  118.36 ms │ +1.07x faster │
│ QQuery 60 │   42.53 ms │                   40.80 ms │     no change │
│ QQuery 61 │   10.30 ms │                   10.06 ms │     no change │
│ QQuery 62 │   46.28 ms │                   47.11 ms │     no change │
│ QQuery 63 │   32.34 ms │                   31.38 ms │     no change │
│ QQuery 64 │  393.76 ms │                  378.53 ms │     no change │
│ QQuery 65 │   78.17 ms │                   75.89 ms │     no change │
│ QQuery 66 │   85.28 ms │                   75.96 ms │ +1.12x faster │
│ QQuery 67 │  275.69 ms │                  254.01 ms │ +1.09x faster │
│ QQuery 68 │    7.96 ms │                    6.87 ms │ +1.16x faster │
│ QQuery 69 │   61.13 ms │                   58.30 ms │     no change │
│ QQuery 70 │  113.15 ms │                  113.09 ms │     no change │
│ QQuery 71 │   38.95 ms │                   38.50 ms │     no change │
│ QQuery 72 │ 1887.84 ms │                 1967.83 ms │     no change │
│ QQuery 73 │    6.27 ms │                    6.41 ms │     no change │
│ QQuery 74 │  255.24 ms │                  249.91 ms │     no change │
│ QQuery 75 │  151.65 ms │                  151.23 ms │     no change │
│ QQuery 76 │   37.81 ms │                   37.12 ms │     no change │
│ QQuery 77 │   64.46 ms │                   65.26 ms │     no change │
│ QQuery 78 │  334.35 ms │                  310.60 ms │ +1.08x faster │
│ QQuery 79 │   74.88 ms │                   74.96 ms │     no change │
│ QQuery 80 │  108.58 ms │                  105.53 ms │     no change │
│ QQuery 81 │   29.99 ms │                   29.40 ms │     no change │
│ QQuery 82 │   18.61 ms │                   18.44 ms │     no change │
│ QQuery 83 │   36.52 ms │                   36.28 ms │     no change │
│ QQuery 84 │   31.24 ms │                   31.72 ms │     no change │
│ QQuery 85 │  104.44 ms │                  103.50 ms │     no change │
│ QQuery 86 │   28.30 ms │                   27.39 ms │     no change │
│ QQuery 87 │   71.20 ms │                   70.20 ms │     no change │
│ QQuery 88 │   64.11 ms │                   62.22 ms │     no change │
│ QQuery 89 │   37.34 ms │                   37.20 ms │     no change │
│ QQuery 90 │   17.78 ms │                   17.34 ms │     no change │
│ QQuery 91 │   43.87 ms │                   42.49 ms │     no change │
│ QQuery 92 │   32.25 ms │                   30.38 ms │ +1.06x faster │
│ QQuery 93 │   54.02 ms │                   52.10 ms │     no change │
│ QQuery 94 │   41.13 ms │                   40.59 ms │     no change │
│ QQuery 95 │   83.79 ms │                   81.82 ms │     no change │
│ QQuery 96 │   25.36 ms │                   24.69 ms │     no change │
│ QQuery 97 │   55.21 ms │                   54.99 ms │     no change │
│ QQuery 98 │   48.24 ms │                   46.93 ms │     no change │
│ QQuery 99 │   68.30 ms │                   68.63 ms │     no change │
└───────────┴────────────┴────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 10180.89ms │
│ Total Time (refactor-hj-regular-stream)   │  9927.85ms │
│ Average Time (HEAD)                       │   102.84ms │
│ Average Time (refactor-hj-regular-stream) │   100.28ms │
│ Queries Faster                            │         28 │
│ Queries Slower                            │          0 │
│ Queries with No Change                    │         71 │
│ Queries with Failure                      │          0 │
└───────────────────────────────────────────┴────────────┘

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

Comparing HEAD and refactor-hj-regular-stream
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃            refactor-hj-regular-stream ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           6.65 / 7.27 ±1.08 / 9.41 ms │           6.34 / 7.03 ±1.18 / 9.39 ms │     no change │
│ QQuery 2  │        84.10 / 84.75 ±0.62 / 85.53 ms │        82.77 / 83.36 ±0.48 / 84.05 ms │     no change │
│ QQuery 3  │        30.45 / 30.96 ±0.38 / 31.59 ms │        30.69 / 30.97 ±0.20 / 31.18 ms │     no change │
│ QQuery 4  │     572.99 / 586.86 ±9.86 / 599.52 ms │     551.10 / 563.80 ±8.97 / 576.64 ms │     no change │
│ QQuery 5  │        55.53 / 56.21 ±0.53 / 57.12 ms │        54.56 / 55.43 ±0.71 / 56.52 ms │     no change │
│ QQuery 6  │        40.03 / 42.65 ±4.31 / 51.21 ms │        39.19 / 39.54 ±0.22 / 39.85 ms │ +1.08x faster │
│ QQuery 7  │        75.80 / 78.11 ±2.36 / 82.57 ms │        75.04 / 77.41 ±3.96 / 85.31 ms │     no change │
│ QQuery 8  │        40.04 / 40.44 ±0.30 / 40.89 ms │        38.46 / 39.29 ±0.57 / 40.06 ms │     no change │
│ QQuery 9  │        57.92 / 59.24 ±0.83 / 60.00 ms │        55.77 / 57.55 ±1.39 / 59.22 ms │     no change │
│ QQuery 10 │        64.08 / 66.82 ±4.27 / 75.33 ms │        62.24 / 64.72 ±3.11 / 70.74 ms │     no change │
│ QQuery 11 │     360.79 / 370.20 ±7.41 / 378.89 ms │     336.88 / 343.30 ±5.53 / 351.52 ms │ +1.08x faster │
│ QQuery 12 │        33.67 / 34.31 ±0.61 / 35.45 ms │        34.15 / 34.70 ±0.62 / 35.89 ms │     no change │
│ QQuery 13 │     122.53 / 123.94 ±1.15 / 125.97 ms │     119.38 / 123.55 ±4.43 / 130.27 ms │     no change │
│ QQuery 14 │     400.72 / 408.26 ±6.28 / 417.51 ms │     392.43 / 403.24 ±9.30 / 420.51 ms │     no change │
│ QQuery 15 │        70.50 / 75.72 ±3.69 / 81.88 ms │        65.05 / 67.12 ±1.81 / 69.31 ms │ +1.13x faster │
│ QQuery 16 │          7.49 / 8.91 ±2.48 / 13.86 ms │           6.78 / 6.85 ±0.12 / 7.09 ms │ +1.30x faster │
│ QQuery 17 │        83.20 / 84.65 ±1.90 / 88.38 ms │        79.36 / 82.00 ±2.06 / 85.12 ms │     no change │
│ QQuery 18 │     120.14 / 123.31 ±2.76 / 127.30 ms │     114.48 / 117.99 ±3.46 / 122.84 ms │     no change │
│ QQuery 19 │        45.15 / 45.73 ±0.32 / 46.02 ms │        43.11 / 44.70 ±1.68 / 47.96 ms │     no change │
│ QQuery 20 │        43.57 / 43.92 ±0.23 / 44.29 ms │        37.90 / 39.10 ±0.65 / 39.84 ms │ +1.12x faster │
│ QQuery 21 │        18.66 / 19.13 ±0.30 / 19.49 ms │        18.15 / 18.35 ±0.20 / 18.64 ms │     no change │
│ QQuery 22 │        77.82 / 78.32 ±0.45 / 79.13 ms │        76.47 / 77.95 ±0.86 / 78.88 ms │     no change │
│ QQuery 23 │     353.25 / 364.65 ±7.19 / 373.48 ms │     337.56 / 346.70 ±6.37 / 353.94 ms │     no change │
│ QQuery 24 │     230.68 / 233.75 ±3.07 / 238.83 ms │     214.94 / 223.36 ±9.36 / 238.67 ms │     no change │
│ QQuery 25 │     115.70 / 118.18 ±2.63 / 123.00 ms │     109.11 / 113.84 ±6.86 / 127.35 ms │     no change │
│ QQuery 26 │        49.90 / 50.52 ±1.03 / 52.57 ms │        48.25 / 48.97 ±0.57 / 49.67 ms │     no change │
│ QQuery 27 │           5.87 / 6.01 ±0.11 / 6.19 ms │           5.62 / 5.80 ±0.09 / 5.89 ms │     no change │
│ QQuery 28 │        65.41 / 67.55 ±3.12 / 73.76 ms │        60.58 / 63.82 ±1.64 / 65.00 ms │ +1.06x faster │
│ QQuery 29 │      99.63 / 101.84 ±2.03 / 104.79 ms │       96.66 / 98.43 ±1.53 / 101.24 ms │     no change │
│ QQuery 30 │        37.29 / 38.45 ±1.20 / 40.43 ms │        35.95 / 36.68 ±0.67 / 37.79 ms │     no change │
│ QQuery 31 │     118.38 / 120.10 ±1.27 / 121.72 ms │     112.58 / 114.28 ±1.28 / 115.81 ms │     no change │
│ QQuery 32 │        22.79 / 23.07 ±0.34 / 23.73 ms │        21.81 / 23.18 ±2.06 / 27.23 ms │     no change │
│ QQuery 33 │        40.61 / 41.55 ±1.27 / 44.05 ms │        38.34 / 39.17 ±0.68 / 40.24 ms │ +1.06x faster │
│ QQuery 34 │           6.55 / 6.71 ±0.12 / 6.93 ms │           6.01 / 6.13 ±0.07 / 6.24 ms │ +1.10x faster │
│ QQuery 35 │        83.13 / 84.29 ±1.01 / 86.17 ms │        76.17 / 77.96 ±1.15 / 79.50 ms │ +1.08x faster │
│ QQuery 36 │           6.84 / 7.13 ±0.19 / 7.36 ms │           5.96 / 6.05 ±0.12 / 6.29 ms │ +1.18x faster │
│ QQuery 37 │           8.35 / 8.49 ±0.10 / 8.62 ms │           7.32 / 7.44 ±0.08 / 7.50 ms │ +1.14x faster │
│ QQuery 38 │        71.94 / 72.75 ±0.78 / 74.14 ms │        64.33 / 65.45 ±0.75 / 66.23 ms │ +1.11x faster │
│ QQuery 39 │        83.27 / 85.37 ±1.80 / 88.41 ms │        78.11 / 81.62 ±1.83 / 83.48 ms │     no change │
│ QQuery 40 │        26.13 / 26.52 ±0.46 / 27.41 ms │        25.25 / 25.71 ±0.36 / 26.29 ms │     no change │
│ QQuery 41 │        14.59 / 14.78 ±0.20 / 15.13 ms │        14.12 / 14.25 ±0.08 / 14.36 ms │     no change │
│ QQuery 42 │        25.74 / 26.47 ±0.61 / 27.26 ms │        25.58 / 25.84 ±0.17 / 26.09 ms │     no change │
│ QQuery 43 │           5.69 / 5.73 ±0.04 / 5.80 ms │           5.13 / 5.24 ±0.10 / 5.41 ms │ +1.09x faster │
│ QQuery 44 │           6.59 / 6.68 ±0.08 / 6.79 ms │           6.08 / 6.55 ±0.78 / 8.12 ms │     no change │
│ QQuery 45 │        49.62 / 51.85 ±1.43 / 53.32 ms │        44.30 / 46.33 ±2.07 / 50.27 ms │ +1.12x faster │
│ QQuery 46 │        13.29 / 13.62 ±0.27 / 14.01 ms │        13.18 / 13.68 ±0.49 / 14.51 ms │     no change │
│ QQuery 47 │     282.42 / 293.79 ±7.35 / 302.74 ms │    263.01 / 280.96 ±10.95 / 295.37 ms │     no change │
│ QQuery 48 │        96.71 / 97.89 ±0.88 / 99.44 ms │      97.57 / 100.66 ±1.64 / 101.96 ms │     no change │
│ QQuery 49 │        77.72 / 81.06 ±3.07 / 86.51 ms │        72.87 / 74.49 ±1.39 / 76.94 ms │ +1.09x faster │
│ QQuery 50 │        60.89 / 61.54 ±0.55 / 62.43 ms │        58.20 / 59.73 ±1.34 / 62.19 ms │     no change │
│ QQuery 51 │        95.81 / 98.29 ±1.37 / 99.76 ms │      99.35 / 103.03 ±4.63 / 111.33 ms │     no change │
│ QQuery 52 │        26.53 / 27.13 ±0.43 / 27.63 ms │        25.79 / 26.06 ±0.20 / 26.40 ms │     no change │
│ QQuery 53 │        32.25 / 32.60 ±0.32 / 33.18 ms │        30.27 / 31.04 ±0.66 / 32.20 ms │     no change │
│ QQuery 54 │        59.28 / 59.52 ±0.24 / 59.98 ms │        55.33 / 55.65 ±0.29 / 56.13 ms │ +1.07x faster │
│ QQuery 55 │        25.82 / 26.08 ±0.17 / 26.28 ms │        25.45 / 25.83 ±0.21 / 26.01 ms │     no change │
│ QQuery 56 │        41.90 / 43.27 ±1.72 / 46.17 ms │        41.68 / 43.86 ±2.84 / 49.22 ms │     no change │
│ QQuery 57 │     190.71 / 193.66 ±2.17 / 197.04 ms │     177.85 / 181.60 ±3.07 / 185.49 ms │ +1.07x faster │
│ QQuery 58 │     112.50 / 114.61 ±1.59 / 117.16 ms │     113.19 / 116.58 ±4.81 / 126.08 ms │     no change │
│ QQuery 59 │     126.95 / 128.96 ±1.47 / 130.72 ms │     118.36 / 120.33 ±1.15 / 121.48 ms │ +1.07x faster │
│ QQuery 60 │        42.53 / 43.02 ±0.57 / 44.10 ms │        40.80 / 41.56 ±0.58 / 42.39 ms │     no change │
│ QQuery 61 │        10.30 / 10.43 ±0.19 / 10.80 ms │        10.06 / 10.25 ±0.21 / 10.64 ms │     no change │
│ QQuery 62 │        46.28 / 46.82 ±0.40 / 47.52 ms │        47.11 / 47.90 ±0.50 / 48.43 ms │     no change │
│ QQuery 63 │        32.34 / 33.25 ±0.85 / 34.78 ms │        31.38 / 31.71 ±0.45 / 32.59 ms │     no change │
│ QQuery 64 │     393.76 / 400.18 ±7.22 / 411.59 ms │     378.53 / 383.74 ±4.85 / 392.31 ms │     no change │
│ QQuery 65 │        78.17 / 83.46 ±5.11 / 91.60 ms │        75.89 / 78.63 ±2.50 / 82.73 ms │ +1.06x faster │
│ QQuery 66 │        85.28 / 86.42 ±1.24 / 88.77 ms │        75.96 / 78.43 ±1.92 / 80.51 ms │ +1.10x faster │
│ QQuery 67 │     275.69 / 284.46 ±4.82 / 290.03 ms │    254.01 / 267.07 ±10.91 / 283.22 ms │ +1.07x faster │
│ QQuery 68 │          7.96 / 9.48 ±2.84 / 15.16 ms │           6.87 / 7.09 ±0.22 / 7.50 ms │ +1.34x faster │
│ QQuery 69 │        61.13 / 63.85 ±3.68 / 71.05 ms │        58.30 / 59.56 ±0.99 / 60.69 ms │ +1.07x faster │
│ QQuery 70 │     113.15 / 115.32 ±1.37 / 117.03 ms │     113.09 / 115.62 ±3.48 / 122.52 ms │     no change │
│ QQuery 71 │        38.95 / 41.63 ±2.48 / 45.86 ms │        38.50 / 39.21 ±0.58 / 40.09 ms │ +1.06x faster │
│ QQuery 72 │ 1887.84 / 1973.01 ±88.77 / 2138.05 ms │ 1967.83 / 2042.01 ±66.87 / 2162.66 ms │     no change │
│ QQuery 73 │           6.27 / 6.40 ±0.07 / 6.48 ms │           6.41 / 6.54 ±0.09 / 6.65 ms │     no change │
│ QQuery 74 │     255.24 / 260.76 ±4.64 / 267.76 ms │     249.91 / 257.02 ±5.37 / 265.00 ms │     no change │
│ QQuery 75 │     151.65 / 153.90 ±1.85 / 156.48 ms │     151.23 / 152.46 ±1.12 / 154.54 ms │     no change │
│ QQuery 76 │        37.81 / 38.47 ±0.63 / 39.62 ms │        37.12 / 38.22 ±1.64 / 41.48 ms │     no change │
│ QQuery 77 │        64.46 / 65.14 ±0.61 / 66.21 ms │        65.26 / 66.64 ±1.11 / 68.20 ms │     no change │
│ QQuery 78 │    334.35 / 353.90 ±18.79 / 380.17 ms │    310.60 / 331.89 ±16.02 / 357.58 ms │ +1.07x faster │
│ QQuery 79 │        74.88 / 79.79 ±8.75 / 97.25 ms │        74.96 / 77.51 ±4.36 / 86.22 ms │     no change │
│ QQuery 80 │     108.58 / 109.71 ±1.51 / 112.65 ms │     105.53 / 107.24 ±1.58 / 109.20 ms │     no change │
│ QQuery 81 │        29.99 / 31.56 ±2.32 / 36.13 ms │        29.40 / 29.97 ±0.37 / 30.40 ms │ +1.05x faster │
│ QQuery 82 │        18.61 / 18.79 ±0.11 / 18.92 ms │        18.44 / 18.67 ±0.15 / 18.85 ms │     no change │
│ QQuery 83 │        36.52 / 36.70 ±0.10 / 36.82 ms │        36.28 / 36.62 ±0.39 / 37.25 ms │     no change │
│ QQuery 84 │        31.24 / 33.28 ±1.35 / 34.67 ms │        31.72 / 33.08 ±0.99 / 34.73 ms │     no change │
│ QQuery 85 │     104.44 / 107.88 ±3.96 / 112.95 ms │     103.50 / 105.54 ±2.88 / 111.21 ms │     no change │
│ QQuery 86 │        28.30 / 28.76 ±0.42 / 29.41 ms │        27.39 / 29.61 ±2.51 / 34.41 ms │     no change │
│ QQuery 87 │        71.20 / 72.60 ±1.02 / 74.10 ms │        70.20 / 71.21 ±0.71 / 72.31 ms │     no change │
│ QQuery 88 │        64.11 / 64.85 ±0.45 / 65.52 ms │        62.22 / 64.06 ±1.07 / 64.97 ms │     no change │
│ QQuery 89 │        37.34 / 37.73 ±0.36 / 38.33 ms │        37.20 / 37.49 ±0.45 / 38.38 ms │     no change │
│ QQuery 90 │        17.78 / 17.95 ±0.11 / 18.11 ms │        17.34 / 17.53 ±0.15 / 17.80 ms │     no change │
│ QQuery 91 │        43.87 / 44.02 ±0.09 / 44.13 ms │        42.49 / 42.94 ±0.29 / 43.33 ms │     no change │
│ QQuery 92 │        32.25 / 33.21 ±1.25 / 35.66 ms │        30.38 / 31.02 ±0.80 / 32.58 ms │ +1.07x faster │
│ QQuery 93 │        54.02 / 55.89 ±2.26 / 60.05 ms │        52.10 / 53.06 ±1.30 / 55.64 ms │ +1.05x faster │
│ QQuery 94 │        41.13 / 41.88 ±0.59 / 42.86 ms │        40.59 / 41.02 ±0.39 / 41.57 ms │     no change │
│ QQuery 95 │        83.79 / 84.21 ±0.75 / 85.70 ms │        81.82 / 83.61 ±1.15 / 85.21 ms │     no change │
│ QQuery 96 │        25.36 / 26.01 ±0.93 / 27.84 ms │        24.69 / 25.16 ±0.59 / 26.31 ms │     no change │
│ QQuery 97 │        55.21 / 56.74 ±0.85 / 57.76 ms │        54.99 / 56.32 ±1.55 / 59.22 ms │     no change │
│ QQuery 98 │        48.24 / 48.90 ±0.55 / 49.50 ms │        46.93 / 48.03 ±0.66 / 48.80 ms │     no change │
│ QQuery 99 │        68.30 / 68.70 ±0.34 / 69.31 ms │        68.63 / 69.76 ±0.98 / 71.07 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 10473.25ms │
│ Total Time (refactor-hj-regular-stream)   │ 10229.18ms │
│ Average Time (HEAD)                       │   105.79ms │
│ Average Time (refactor-hj-regular-stream) │   103.33ms │
│ Queries Faster                            │         28 │
│ Queries Slower                            │          0 │
│ Queries with No Change                    │         71 │
│ Queries with Failure                      │          0 │
└───────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 2.3 GiB
Avg memory 1.6 GiB
CPU user 217.9s
CPU sys 7.1s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 55.0s
Peak memory 2.4 GiB
Avg memory 1.6 GiB
CPU user 219.9s
CPU sys 6.4s
Peak spill 0 B

File an issue against this benchmark runner

@mbutrovich mbutrovich 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.

@2010YOUY01 thanks for the quick turnaround on the earlier comments.

Could we add a notice to the stream.rs module doc? It should say that inner, left, right, and full joins reach HashJoinStream only with enable_migration_hash_join = false, and that changes for those join types belong in BatchedJoinProcessor. Semi, anti, mark, and null-aware joins still run there by default, so the notice can't cover the whole stream the way the # Deprecation section in grouped_hash_stream.rs does for aggregates. #27228 shows the risk. It adds the Left and Right single-join check to HashJoinStream, so after this PR that check would run only with the flag off, and the default path would return duplicate rows instead of the error. Whichever of the two lands second has to add the check to the new path or route single joins to the legacy stream.

@mbutrovich

Copy link
Copy Markdown
Contributor

I ran property-based tests from arrow-pbt (mbutrovich/arrow-pbt#5) against this PR at dbc4514, with arrow-rs main at d65329d3e7. Every join test passed seeds 1 to 6 at 1,000 cases each, including one that compares enable_migration_hash_join on and off.

That test runs the same HashJoinExec with the option on and off, and checks that both fail, or both return the same output types and the same rows in any order, with every output column valid under the Arrow format. Two more tests compare the hash join with a NestedLoopJoinExec whose filter is the residual filter and one = or IS NOT DISTINCT FROM per key, and the perfect hash join (ArrayMap) with the general hash map.

The cases cover every join type, both NullEquality values, a residual filter in half of them, and CollectLeft and Partitioned with one partition per side. Keys are one or two columns of 24 types, including dictionaries, views, structs, lists, and floats whose values include NaN, -0.0, and 0.0. Both sides draw each key column from one small pool of values, and batch_size is 1 to 8, 16, 63 to 65, 1024, or 8192. In 31% of cases a probe row matches more build rows than batch_size, so its matches span chunks and reach last_probe_row_with_on_match for the joins that keep unmatched probe rows. That share depends only on the inputs. On main at e2dc8b0, 4.2% of cases built an ArrayMap.

The comparison with the nested loop join also discarded 175 cases on three open arrow-rs bugs that the joins' non-key columns reach: apache/arrow-rs#11607, apache/arrow-rs#10925, and apache/arrow-rs#11835. In the enable_migration_hash_join test, a case where both paths fail on one of those bugs counts as agreement.

To rerun it, check out the datafusion-27399 branch of arrow-pbt, whose Cargo.toml points at this PR, and run:

ARROW_PBT_SEEDS=1-6 ARROW_PBT_CASES=1000 cargo test -p arrow-pbt-datafusion --test joins

2010YOUY01 and others added 4 commits November 18, 2026 16:15
…essor.rs

Co-authored-by: Matt Butrovich <mbutrovich@users.noreply.github.com>
…essor.rs

Co-authored-by: Matt Butrovich <mbutrovich@users.noreply.github.com>
@2010YOUY01

Copy link
Copy Markdown
Member Author

Could we add a notice to the stream.rs module doc? It should say that inner, left, right, and full joins reach HashJoinStream only with enable_migration_hash_join = false, and that changes for those join types belong in BatchedJoinProcessor. Semi, anti, mark, and null-aware joins still run there by default, so the notice can't cover the whole stream the way the # Deprecation section in grouped_hash_stream.rs does for aggregates. #27228 shows the risk. It adds the Left and Right single-join check to HashJoinStream, so after this PR that check would run only with the flag off, and the default path would return duplicate rows instead of the error. Whichever of the two lands second has to add the check to the new path or route single joins to the legacy stream.

I've updated the comments in 804c9ed

@mbutrovich mbutrovich 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.

@2010YOUY01 thanks for working through both rounds. This LGTM!

@2010YOUY01
2010YOUY01 added this pull request to the merge queue Nov 20, 2026
@2010YOUY01

Copy link
Copy Markdown
Member Author

@jayzhan211 @mbutrovich Thanks again

Merged via the queue into apache:main with commit bdd86f1 Nov 20, 2026
43 checks passed
@2010YOUY01
2010YOUY01 deleted the refactor-hj-regular-stream branch November 20, 2026 00:48
mbutrovich added a commit to mbutrovich/arrow-pbt that referenced this pull request Nov 23, 2026
mbutrovich added a commit to mbutrovich/arrow-pbt that referenced this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate core Core DataFusion crate documentation Improvements or additions to documentation physical-plan Changes to the physical-plan crate sqllogictest SQL Logic Tests (.slt) v57.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants