Skip to content

fix: keep sort run batches reserved until the merge takes them - #28037

Open
comphead wants to merge 1 commit into
apache:mainfrom
comphead:fix-26411-sort-merge-handoff
Open

comphead wants to merge 1 commit into
apache:mainfrom
comphead:fix-26411-sort-merge-handoff

Conversation

@comphead

@comphead comphead commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

SortExec reads one batch ahead of the merge in every sorted run (with_lookahead, from #26242). A run releases a batch's reservation when the batch is read, so the read-ahead batch stays in memory without a reservation until the merge takes it. The memory pool sees one output batch per multi-batch run as free, and can grant it to other consumers.

Measured with a counting allocator against pool.reserved(): 32 runs of 1 MiB batches leave 32.3 MiB outside any reservation, and 64 runs leave 64.5 MiB. When another consumer takes what the pool reports free, the live heap ends 32 MiB above the limit.

Removing the read-ahead alone fails test_sort_merge_lookahead_returns_cursor_workspace, because the read-ahead also gave the merge headroom. In that test the merge's field cursor charges the key column a second time.

What changes are included in this PR?

  • ExternalSorter::prepare_sort_run no longer reads ahead. A run's batch stays reserved until the merge takes it, and the merge reserves it right away.
  • sort_run keeps room for the merge's cursor over the run until the merge takes the first batch. It keeps the estimated row-format keys of that batch, or the batch itself if larger, out of the slack its sorting reservation already holds, and never grows the reservation for it. encoded_keys_may_exceed and this share estimated_row_keys_size.
  • FieldCursorStream no longer reserves a column key. The key is part of the batch, which the merge reserves for longer than the cursor lives. Computed keys are still reserved.

Live heap minus pool.reserved() after the first output batch, from the same probe on a real SortExec:

case main PR
8 / 32 / 64 runs of 8 batches (1 MiB each), two keys 8.2 / 32.3 / 64.5 MiB 0.2 / 0.3 / 0.5 MiB
32 runs of 2 batches 32.2 MiB 0.2 MiB
one key, 8192-row input batches, 256 MiB 33.4 MiB 1.2 MiB
spilling sort, largest during the spill merges 64.5 MiB 3.4 MiB
live heap with a co-tenant filling a 600 MiB pool 632.3 MiB 600.3 MiB

What is the testing strategy for this PR?

  • test_sort_merge_keeps_run_batches_reserved: 4 runs of 4 batches with two Int64 keys, so the merge uses row cursors. After the sort, another consumer takes the rest of the pool. The merge must still start, and after the first output batch the sort must still reserve every sorted batch. It fails on main at the reservation check, and fails with ResourcesExhausted when the cursor headroom is removed.
  • test_sort_merge_lookahead_returns_cursor_workspace is renamed to test_sort_merge_fits_in_returned_workspace and passes unchanged.
  • Locally: datafusion-physical-plan lib tests, the core memory_limit tests, the sort and spill fuzz tests in extended_tests, all sqllogictests and ci/scripts/rust_clippy.sh.

Draft #26728 ignores its ORDER BY s DESC case because of #26411. I have not run that case against this change.

Are there any user-facing changes?

No API changes. While a sort merges its runs, the pool now counts one batch per run that it did not count before, so other consumers of a memory-limited pool see that much less free memory.

SortExec read one batch ahead of the merge in every sorted run. A run
releases a batch's reservation when the batch is read, so the read-ahead
batch stayed in memory without a reservation, one batch per run.

Remove the read-ahead. To keep the headroom it gave the merge, each run
keeps room for the merge's cursor out of its sorting reservation until the
merge takes its first batch, and FieldCursorStream no longer reserves a
column key, which the merge already reserves with the batch.

Closes apache#26411
@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Dec 5, 2026
@comphead

comphead commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark tpch tpcds clickbench

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c7428025353-6250-cb7cm 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 fix-26411-sort-merge-handoff (c66a676) to 04daf48 (merge-base) diff

Run configuration
run benchmark tpch
Trigger comment
run benchmark tpch tpcds clickbench

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-c7428025353-6252-t9k6z 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 fix-26411-sort-merge-handoff (c66a676) to 04daf48 (merge-base) diff

Run configuration
run benchmark clickbench
Trigger comment
run benchmark tpch tpcds clickbench

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-c7428025353-6251-ks6wx 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 fix-26411-sort-merge-handoff (c66a676) to 04daf48 (merge-base) diff

Run configuration
run benchmark tpcds
Trigger comment
run benchmark tpch tpcds clickbench

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 fix-26411-sort-merge-handoff (c66a676) to 04daf48 (merge-base) diff

Run configuration
run benchmark tpch
Trigger comment
run benchmark tpch tpcds clickbench
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 fix-26411-sort-merge-handoff
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃     HEAD ┃ fix-26411-sort-merge-handoff ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │ 40.67 ms │                     38.53 ms │ +1.06x faster │
│ QQuery 2  │ 21.58 ms │                     20.04 ms │ +1.08x faster │
│ QQuery 3  │ 28.63 ms │                     27.78 ms │     no change │
│ QQuery 4  │ 17.32 ms │                     16.64 ms │     no change │
│ QQuery 5  │ 36.11 ms │                     34.72 ms │     no change │
│ QQuery 6  │ 14.24 ms │                     14.09 ms │     no change │
│ QQuery 7  │ 42.23 ms │                     40.74 ms │     no change │
│ QQuery 8  │ 40.26 ms │                     39.36 ms │     no change │
│ QQuery 9  │ 48.13 ms │                     47.88 ms │     no change │
│ QQuery 10 │ 39.43 ms │                     39.37 ms │     no change │
│ QQuery 11 │ 13.28 ms │                     13.07 ms │     no change │
│ QQuery 12 │ 15.91 ms │                     16.11 ms │     no change │
│ QQuery 13 │ 39.31 ms │                     39.03 ms │     no change │
│ QQuery 14 │ 23.74 ms │                     23.66 ms │     no change │
│ QQuery 15 │ 30.64 ms │                     30.66 ms │     no change │
│ QQuery 16 │ 13.15 ms │                     13.06 ms │     no change │
│ QQuery 17 │ 63.78 ms │                     63.83 ms │     no change │
│ QQuery 18 │ 39.90 ms │                     40.36 ms │     no change │
│ QQuery 19 │ 31.78 ms │                     31.90 ms │     no change │
│ QQuery 20 │ 31.20 ms │                     31.51 ms │     no change │
│ QQuery 21 │ 53.72 ms │                     54.20 ms │     no change │
│ QQuery 22 │ 13.13 ms │                     13.60 ms │     no change │
└───────────┴──────────┴──────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                           ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                           │ 698.15ms │
│ Total Time (fix-26411-sort-merge-handoff)   │ 690.14ms │
│ Average Time (HEAD)                         │  31.73ms │
│ Average Time (fix-26411-sort-merge-handoff) │  31.37ms │
│ Queries Faster                              │        2 │
│ Queries Slower                              │        0 │
│ Queries with No Change                      │       20 │
│ Queries with Failure                        │        0 │
└─────────────────────────────────────────────┴──────────┘

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

Comparing HEAD and fix-26411-sort-merge-handoff
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃   fix-26411-sort-merge-handoff ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │ 40.67 / 41.37 ±1.30 / 43.97 ms │ 38.53 / 38.62 ±0.06 / 38.70 ms │ +1.07x faster │
│ QQuery 2  │ 21.58 / 21.76 ±0.12 / 21.90 ms │ 20.04 / 20.22 ±0.11 / 20.36 ms │ +1.08x faster │
│ QQuery 3  │ 28.63 / 29.16 ±0.51 / 30.10 ms │ 27.78 / 28.15 ±0.24 / 28.52 ms │     no change │
│ QQuery 4  │ 17.32 / 17.69 ±0.24 / 18.02 ms │ 16.64 / 16.79 ±0.09 / 16.88 ms │ +1.05x faster │
│ QQuery 5  │ 36.11 / 36.39 ±0.19 / 36.65 ms │ 34.72 / 34.87 ±0.13 / 35.10 ms │     no change │
│ QQuery 6  │ 14.24 / 14.34 ±0.08 / 14.43 ms │ 14.09 / 14.67 ±0.72 / 16.03 ms │     no change │
│ QQuery 7  │ 42.23 / 43.73 ±1.15 / 45.01 ms │ 40.74 / 42.91 ±1.53 / 45.43 ms │     no change │
│ QQuery 8  │ 40.26 / 41.15 ±1.39 / 43.91 ms │ 39.36 / 39.53 ±0.16 / 39.82 ms │     no change │
│ QQuery 9  │ 48.13 / 49.98 ±1.53 / 52.35 ms │ 47.88 / 48.33 ±0.48 / 48.92 ms │     no change │
│ QQuery 10 │ 39.43 / 40.10 ±0.84 / 41.68 ms │ 39.37 / 39.48 ±0.14 / 39.75 ms │     no change │
│ QQuery 11 │ 13.28 / 13.40 ±0.07 / 13.50 ms │ 13.07 / 13.33 ±0.19 / 13.65 ms │     no change │
│ QQuery 12 │ 15.91 / 16.03 ±0.10 / 16.15 ms │ 16.11 / 16.22 ±0.13 / 16.46 ms │     no change │
│ QQuery 13 │ 39.31 / 39.69 ±0.21 / 39.89 ms │ 39.03 / 39.33 ±0.24 / 39.77 ms │     no change │
│ QQuery 14 │ 23.74 / 23.82 ±0.08 / 23.97 ms │ 23.66 / 23.89 ±0.33 / 24.54 ms │     no change │
│ QQuery 15 │ 30.64 / 30.92 ±0.38 / 31.66 ms │ 30.66 / 31.11 ±0.47 / 31.96 ms │     no change │
│ QQuery 16 │ 13.15 / 13.31 ±0.12 / 13.50 ms │ 13.06 / 13.18 ±0.09 / 13.32 ms │     no change │
│ QQuery 17 │ 63.78 / 65.00 ±1.14 / 66.73 ms │ 63.83 / 64.75 ±0.86 / 65.95 ms │     no change │
│ QQuery 18 │ 39.90 / 40.41 ±0.52 / 41.37 ms │ 40.36 / 40.87 ±0.40 / 41.37 ms │     no change │
│ QQuery 19 │ 31.78 / 32.56 ±1.25 / 35.06 ms │ 31.90 / 32.29 ±0.59 / 33.47 ms │     no change │
│ QQuery 20 │ 31.20 / 31.55 ±0.24 / 31.92 ms │ 31.51 / 31.98 ±0.39 / 32.58 ms │     no change │
│ QQuery 21 │ 53.72 / 54.44 ±0.65 / 55.45 ms │ 54.20 / 55.54 ±1.09 / 57.15 ms │     no change │
│ QQuery 22 │ 13.13 / 13.31 ±0.10 / 13.40 ms │ 13.60 / 13.75 ±0.13 / 13.95 ms │     no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                           ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                           │ 710.10ms │
│ Total Time (fix-26411-sort-merge-handoff)   │ 699.82ms │
│ Average Time (HEAD)                         │  32.28ms │
│ Average Time (fix-26411-sort-merge-handoff) │  31.81ms │
│ Queries Faster                              │        3 │
│ Queries Slower                              │        0 │
│ Queries with No Change                      │       19 │
│ Queries with Failure                        │        0 │
└─────────────────────────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 1.2 GiB
Avg memory 678.9 MiB
CPU user 22.8s
CPU sys 1.8s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 1.2 GiB
Avg memory 701.3 MiB
CPU user 22.8s
CPU sys 1.7s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: clickbench

Runner log (last 40 lines)
h2o_big_window_sorted_parquet:    Window Top-N over a declared-sorted h2o input, large dataset (1e9 rows),  source file format is parquet
h2o_small_parquet:              h2oai benchmark with small dataset (1e7 rows) for groupby,  file format is parquet
h2o_medium_parquet:             h2oai benchmark with medium dataset (1e8 rows) for groupby, file format is parquet
h2o_big_parquet:                h2oai benchmark with large dataset (1e9 rows) for groupby,  file format is parquet
h2o_small_join_parquet:         h2oai benchmark with small dataset (1e7 rows) for join,  file format is parquet
h2o_medium_join_parquet:        h2oai benchmark with medium dataset (1e8 rows) for join, file format is parquet
h2o_big_join_parquet:           h2oai benchmark with large dataset (1e9 rows) for join,  file format is parquet
h2o_small_window_parquet:       Extended h2oai benchmark with small dataset (1e7 rows) for window,  file format is parquet
h2o_medium_window_parquet:      Extended h2oai benchmark with medium dataset (1e8 rows) for window, file format is parquet
h2o_big_window_parquet:         Extended h2oai benchmark with large dataset (1e9 rows) for window,  file format is parquet

# Join Order Benchmark (IMDB)
imdb:                   Join Order Benchmark (JOB) using the IMDB dataset converted to parquet

# Micro-Benchmarks (specific operators and features)
cancellation:           How long cancelling a query takes
asof_join:              ASOF join workloads varying size, ordering, grouping, match direction, and payload width
nlj:                    Benchmark for simple nested loop joins, testing various join scenarios
hj:                     Benchmark for simple hash joins, testing various join scenarios
smj:                    Benchmark for simple sort merge joins, testing various join scenarios
dict:                   Benchmark for dictionary-encoded group-by scenarios
array_agg_distinct:     1000K-group, two-row-per-group array_agg(DISTINCT) benchmark
grouped_count_distinct: Grouped count(DISTINCT) by key type, group count and distinct cardinality
compile_profile:        Compile and execute TPC-H across selected Cargo profiles, reporting timing and binary size


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Supported Configuration (Environment Variables)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DATA_DIR            directory to store datasets
CARGO_COMMAND       command that runs the benchmark binary
DATAFUSION_DIR      directory to use (default /workspace/datafusion-base)
RESULTS_NAME        folder where the benchmark files are stored
SIMULATE_LATENCY    Serve local files as if they were remote object storage: per-request
                    latency, per-connection bandwidth and paginated LIST (default false)
DATAFUSION_*        Set the given datafusion configuration


stderr:
Kubernetes message
Job has reached the specified backoff limit

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 fix-26411-sort-merge-handoff (c66a676) to 04daf48 (merge-base) diff

Run configuration
run benchmark tpcds
Trigger comment
run benchmark tpch tpcds clickbench
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 fix-26411-sort-merge-handoff
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃ fix-26411-sort-merge-handoff ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │    5.33 ms │                      5.28 ms │ no change │
│ QQuery 2  │   79.24 ms │                     77.41 ms │ no change │
│ QQuery 3  │   27.50 ms │                     27.22 ms │ no change │
│ QQuery 4  │  426.58 ms │                    413.27 ms │ no change │
│ QQuery 5  │   49.00 ms │                     49.03 ms │ no change │
│ QQuery 6  │   33.84 ms │                     33.64 ms │ no change │
│ QQuery 7  │   71.37 ms │                     70.45 ms │ no change │
│ QQuery 8  │   37.06 ms │                     36.50 ms │ no change │
│ QQuery 9  │   51.99 ms │                     50.43 ms │ no change │
│ QQuery 10 │   58.82 ms │                     58.37 ms │ no change │
│ QQuery 11 │  261.65 ms │                    251.41 ms │ no change │
│ QQuery 12 │   28.34 ms │                     27.46 ms │ no change │
│ QQuery 13 │  112.79 ms │                    111.73 ms │ no change │
│ QQuery 14 │  355.81 ms │                    354.20 ms │ no change │
│ QQuery 15 │   52.27 ms │                     50.77 ms │ no change │
│ QQuery 16 │    5.81 ms │                      5.64 ms │ no change │
│ QQuery 17 │   71.90 ms │                     71.46 ms │ no change │
│ QQuery 18 │   99.38 ms │                     99.43 ms │ no change │
│ QQuery 19 │   39.58 ms │                     39.35 ms │ no change │
│ QQuery 20 │   34.32 ms │                     34.00 ms │ no change │
│ QQuery 21 │   16.69 ms │                     16.00 ms │ no change │
│ QQuery 22 │   61.53 ms │                     60.81 ms │ no change │
│ QQuery 23 │  287.78 ms │                    281.62 ms │ no change │
│ QQuery 24 │  185.49 ms │                    181.00 ms │ no change │
│ QQuery 25 │  100.62 ms │                     98.93 ms │ no change │
│ QQuery 26 │   45.07 ms │                     43.99 ms │ no change │
│ QQuery 27 │    4.90 ms │                      4.82 ms │ no change │
│ QQuery 28 │   62.66 ms │                     61.40 ms │ no change │
│ QQuery 29 │   87.09 ms │                     85.99 ms │ no change │
│ QQuery 30 │   31.58 ms │                     30.40 ms │ no change │
│ QQuery 31 │  105.10 ms │                    103.58 ms │ no change │
│ QQuery 32 │   19.36 ms │                     18.63 ms │ no change │
│ QQuery 33 │   35.97 ms │                     35.67 ms │ no change │
│ QQuery 34 │    5.45 ms │                      5.33 ms │ no change │
│ QQuery 35 │   69.22 ms │                     67.76 ms │ no change │
│ QQuery 36 │    5.32 ms │                      5.22 ms │ no change │
│ QQuery 37 │    6.88 ms │                      6.72 ms │ no change │
│ QQuery 38 │   58.67 ms │                     57.82 ms │ no change │
│ QQuery 39 │   70.35 ms │                     69.50 ms │ no change │
│ QQuery 40 │   22.05 ms │                     21.20 ms │ no change │
│ QQuery 41 │   12.31 ms │                     12.30 ms │ no change │
│ QQuery 42 │   23.34 ms │                     22.89 ms │ no change │
│ QQuery 43 │    4.20 ms │                      4.39 ms │ no change │
│ QQuery 44 │    5.26 ms │                      5.48 ms │ no change │
│ QQuery 45 │   34.50 ms │                     34.10 ms │ no change │
│ QQuery 46 │    6.43 ms │                      6.42 ms │ no change │
│ QQuery 47 │  208.25 ms │                    206.97 ms │ no change │
│ QQuery 48 │   91.38 ms │                     92.35 ms │ no change │
│ QQuery 49 │   69.07 ms │                     70.16 ms │ no change │
│ QQuery 50 │   54.50 ms │                     55.13 ms │ no change │
│ QQuery 51 │   85.53 ms │                     85.31 ms │ no change │
│ QQuery 52 │   23.50 ms │                     23.59 ms │ no change │
│ QQuery 53 │   28.79 ms │                     29.03 ms │ no change │
│ QQuery 54 │   54.75 ms │                     54.12 ms │ no change │
│ QQuery 55 │   23.35 ms │                     23.10 ms │ no change │
│ QQuery 56 │   36.96 ms │                     37.30 ms │ no change │
│ QQuery 57 │  163.05 ms │                    161.42 ms │ no change │
│ QQuery 58 │  104.70 ms │                    104.22 ms │ no change │
│ QQuery 59 │  113.27 ms │                    112.83 ms │ no change │
│ QQuery 60 │   37.02 ms │                     37.42 ms │ no change │
│ QQuery 61 │    8.67 ms │                      8.69 ms │ no change │
│ QQuery 62 │   42.76 ms │                     41.93 ms │ no change │
│ QQuery 63 │   28.91 ms │                     28.48 ms │ no change │
│ QQuery 64 │  243.37 ms │                    243.04 ms │ no change │
│ QQuery 65 │   65.12 ms │                     65.29 ms │ no change │
│ QQuery 66 │   72.40 ms │                     71.92 ms │ no change │
│ QQuery 67 │  212.20 ms │                    208.68 ms │ no change │
│ QQuery 68 │    6.25 ms │                      6.25 ms │ no change │
│ QQuery 69 │   55.27 ms │                     55.24 ms │ no change │
│ QQuery 70 │   78.19 ms │                     77.14 ms │ no change │
│ QQuery 71 │   34.01 ms │                     34.33 ms │ no change │
│ QQuery 72 │ 1434.12 ms │                   1406.41 ms │ no change │
│ QQuery 73 │    5.23 ms │                      5.12 ms │ no change │
│ QQuery 74 │  146.67 ms │                    143.79 ms │ no change │
│ QQuery 75 │  131.15 ms │                    130.34 ms │ no change │
│ QQuery 76 │   33.62 ms │                     32.59 ms │ no change │
│ QQuery 77 │   58.77 ms │                     58.23 ms │ no change │
│ QQuery 78 │  246.28 ms │                    246.44 ms │ no change │
│ QQuery 79 │   67.93 ms │                     67.22 ms │ no change │
│ QQuery 80 │   90.26 ms │                     90.10 ms │ no change │
│ QQuery 81 │   24.79 ms │                     25.55 ms │ no change │
│ QQuery 82 │   16.06 ms │                     16.25 ms │ no change │
│ QQuery 83 │   31.67 ms │                     31.80 ms │ no change │
│ QQuery 84 │   28.50 ms │                     28.64 ms │ no change │
│ QQuery 85 │   95.72 ms │                     95.14 ms │ no change │
│ QQuery 86 │   24.43 ms │                     24.01 ms │ no change │
│ QQuery 87 │   58.22 ms │                     58.53 ms │ no change │
│ QQuery 88 │   59.24 ms │                     58.25 ms │ no change │
│ QQuery 89 │   34.02 ms │                     33.36 ms │ no change │
│ QQuery 90 │   15.36 ms │                     15.27 ms │ no change │
│ QQuery 91 │   40.02 ms │                     39.00 ms │ no change │
│ QQuery 92 │   27.44 ms │                     27.62 ms │ no change │
│ QQuery 93 │   47.10 ms │                     46.11 ms │ no change │
│ QQuery 94 │   37.07 ms │                     37.01 ms │ no change │
│ QQuery 95 │   75.73 ms │                     75.42 ms │ no change │
│ QQuery 96 │   22.78 ms │                     22.91 ms │ no change │
│ QQuery 97 │   48.39 ms │                     47.92 ms │ no change │
│ QQuery 98 │   41.46 ms │                     41.59 ms │ no change │
│ QQuery 99 │   64.64 ms │                     62.67 ms │ no change │
└───────────┴────────────┴──────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                           ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                           │ 8218.35ms │
│ Total Time (fix-26411-sort-merge-handoff)   │ 8110.30ms │
│ Average Time (HEAD)                         │   83.01ms │
│ Average Time (fix-26411-sort-merge-handoff) │   81.92ms │
│ Queries Faster                              │         0 │
│ Queries Slower                              │         0 │
│ Queries with No Change                      │        99 │
│ Queries with Failure                        │         0 │
└─────────────────────────────────────────────┴───────────┘

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

Comparing HEAD and fix-26411-sort-merge-handoff
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃          fix-26411-sort-merge-handoff ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │           5.33 / 5.38 ±0.08 / 5.54 ms │           5.28 / 5.33 ±0.07 / 5.46 ms │ no change │
│ QQuery 2  │        79.24 / 79.55 ±0.17 / 79.75 ms │        77.41 / 77.61 ±0.18 / 77.82 ms │ no change │
│ QQuery 3  │        27.50 / 27.85 ±0.41 / 28.65 ms │        27.22 / 27.51 ±0.23 / 27.90 ms │ no change │
│ QQuery 4  │     426.58 / 435.39 ±5.67 / 443.14 ms │     413.27 / 418.42 ±5.28 / 428.12 ms │ no change │
│ QQuery 5  │        49.00 / 49.41 ±0.27 / 49.77 ms │        49.03 / 49.38 ±0.21 / 49.66 ms │ no change │
│ QQuery 6  │        33.84 / 34.19 ±0.33 / 34.78 ms │        33.64 / 33.93 ±0.16 / 34.10 ms │ no change │
│ QQuery 7  │        71.37 / 71.55 ±0.12 / 71.70 ms │        70.45 / 70.69 ±0.43 / 71.54 ms │ no change │
│ QQuery 8  │        37.06 / 37.39 ±0.26 / 37.75 ms │        36.50 / 36.78 ±0.30 / 37.32 ms │ no change │
│ QQuery 9  │        51.99 / 53.06 ±0.55 / 53.48 ms │        50.43 / 52.07 ±1.19 / 53.85 ms │ no change │
│ QQuery 10 │        58.82 / 58.96 ±0.10 / 59.07 ms │        58.37 / 58.84 ±0.37 / 59.46 ms │ no change │
│ QQuery 11 │     261.65 / 263.67 ±1.75 / 265.74 ms │     251.41 / 258.04 ±4.94 / 264.66 ms │ no change │
│ QQuery 12 │        28.34 / 28.63 ±0.25 / 28.99 ms │        27.46 / 27.65 ±0.16 / 27.93 ms │ no change │
│ QQuery 13 │     112.79 / 113.00 ±0.19 / 113.22 ms │     111.73 / 112.40 ±0.43 / 112.90 ms │ no change │
│ QQuery 14 │     355.81 / 359.77 ±2.34 / 362.69 ms │     354.20 / 359.41 ±2.74 / 362.19 ms │ no change │
│ QQuery 15 │        52.27 / 53.10 ±0.55 / 53.92 ms │        50.77 / 51.97 ±0.72 / 52.94 ms │ no change │
│ QQuery 16 │           5.81 / 5.90 ±0.06 / 5.98 ms │           5.64 / 5.72 ±0.06 / 5.79 ms │ no change │
│ QQuery 17 │        71.90 / 72.24 ±0.33 / 72.74 ms │        71.46 / 71.85 ±0.26 / 72.20 ms │ no change │
│ QQuery 18 │      99.38 / 100.27 ±0.68 / 101.10 ms │      99.43 / 100.22 ±0.51 / 100.87 ms │ no change │
│ QQuery 19 │        39.58 / 39.93 ±0.23 / 40.25 ms │        39.35 / 39.92 ±0.36 / 40.44 ms │ no change │
│ QQuery 20 │        34.32 / 34.83 ±0.41 / 35.53 ms │        34.00 / 34.53 ±0.33 / 35.01 ms │ no change │
│ QQuery 21 │        16.69 / 16.74 ±0.03 / 16.78 ms │        16.00 / 16.12 ±0.12 / 16.35 ms │ no change │
│ QQuery 22 │        61.53 / 62.26 ±0.55 / 63.09 ms │        60.81 / 61.18 ±0.34 / 61.74 ms │ no change │
│ QQuery 23 │     287.78 / 288.89 ±0.88 / 290.03 ms │     281.62 / 282.59 ±0.96 / 284.21 ms │ no change │
│ QQuery 24 │     185.49 / 187.11 ±1.36 / 189.20 ms │     181.00 / 182.17 ±0.74 / 183.19 ms │ no change │
│ QQuery 25 │     100.62 / 100.76 ±0.12 / 100.97 ms │       98.93 / 99.98 ±0.77 / 100.77 ms │ no change │
│ QQuery 26 │        45.07 / 45.26 ±0.22 / 45.60 ms │        43.99 / 44.56 ±0.35 / 44.99 ms │ no change │
│ QQuery 27 │           4.90 / 4.99 ±0.11 / 5.18 ms │           4.82 / 4.92 ±0.09 / 5.08 ms │ no change │
│ QQuery 28 │        62.66 / 62.95 ±0.15 / 63.08 ms │        61.40 / 62.55 ±0.61 / 63.10 ms │ no change │
│ QQuery 29 │        87.09 / 87.41 ±0.29 / 87.89 ms │        85.99 / 86.44 ±0.30 / 86.93 ms │ no change │
│ QQuery 30 │        31.58 / 32.01 ±0.36 / 32.52 ms │        30.40 / 30.71 ±0.23 / 31.05 ms │ no change │
│ QQuery 31 │     105.10 / 105.76 ±0.57 / 106.80 ms │     103.58 / 104.47 ±0.69 / 105.69 ms │ no change │
│ QQuery 32 │        19.36 / 19.53 ±0.13 / 19.75 ms │        18.63 / 19.18 ±0.29 / 19.48 ms │ no change │
│ QQuery 33 │        35.97 / 36.57 ±0.46 / 37.35 ms │        35.67 / 35.90 ±0.31 / 36.51 ms │ no change │
│ QQuery 34 │           5.45 / 5.57 ±0.09 / 5.68 ms │           5.33 / 5.45 ±0.07 / 5.56 ms │ no change │
│ QQuery 35 │        69.22 / 69.47 ±0.13 / 69.58 ms │        67.76 / 68.34 ±0.44 / 68.92 ms │ no change │
│ QQuery 36 │           5.32 / 5.35 ±0.04 / 5.43 ms │           5.22 / 5.28 ±0.04 / 5.31 ms │ no change │
│ QQuery 37 │           6.88 / 6.96 ±0.05 / 7.01 ms │           6.72 / 6.78 ±0.04 / 6.83 ms │ no change │
│ QQuery 38 │        58.67 / 59.17 ±0.56 / 60.26 ms │        57.82 / 58.43 ±0.35 / 58.85 ms │ no change │
│ QQuery 39 │        70.35 / 70.81 ±0.50 / 71.71 ms │        69.50 / 69.95 ±0.44 / 70.75 ms │ no change │
│ QQuery 40 │        22.05 / 22.10 ±0.05 / 22.15 ms │        21.20 / 21.55 ±0.19 / 21.74 ms │ no change │
│ QQuery 41 │        12.31 / 12.55 ±0.20 / 12.75 ms │        12.30 / 12.45 ±0.11 / 12.57 ms │ no change │
│ QQuery 42 │        23.34 / 23.43 ±0.14 / 23.71 ms │        22.89 / 23.13 ±0.23 / 23.55 ms │ no change │
│ QQuery 43 │           4.20 / 4.25 ±0.05 / 4.34 ms │           4.39 / 4.42 ±0.02 / 4.47 ms │ no change │
│ QQuery 44 │           5.26 / 5.33 ±0.04 / 5.39 ms │           5.48 / 5.53 ±0.03 / 5.57 ms │ no change │
│ QQuery 45 │        34.50 / 35.40 ±0.70 / 36.46 ms │        34.10 / 34.97 ±0.96 / 36.69 ms │ no change │
│ QQuery 46 │           6.43 / 6.49 ±0.06 / 6.58 ms │           6.42 / 6.57 ±0.12 / 6.74 ms │ no change │
│ QQuery 47 │     208.25 / 210.64 ±2.43 / 214.52 ms │     206.97 / 207.65 ±0.68 / 208.70 ms │ no change │
│ QQuery 48 │        91.38 / 92.12 ±0.54 / 92.75 ms │        92.35 / 92.68 ±0.30 / 93.04 ms │ no change │
│ QQuery 49 │        69.07 / 69.63 ±0.64 / 70.87 ms │        70.16 / 70.65 ±0.35 / 71.20 ms │ no change │
│ QQuery 50 │        54.50 / 54.90 ±0.21 / 55.10 ms │        55.13 / 55.33 ±0.13 / 55.49 ms │ no change │
│ QQuery 51 │        85.53 / 86.58 ±0.99 / 88.19 ms │        85.31 / 86.41 ±0.63 / 87.04 ms │ no change │
│ QQuery 52 │        23.50 / 24.22 ±0.72 / 25.55 ms │        23.59 / 23.82 ±0.16 / 24.04 ms │ no change │
│ QQuery 53 │        28.79 / 29.68 ±0.60 / 30.38 ms │        29.03 / 29.33 ±0.23 / 29.62 ms │ no change │
│ QQuery 54 │        54.75 / 55.10 ±0.28 / 55.59 ms │        54.12 / 54.93 ±0.46 / 55.51 ms │ no change │
│ QQuery 55 │        23.35 / 23.50 ±0.12 / 23.66 ms │        23.10 / 23.30 ±0.12 / 23.41 ms │ no change │
│ QQuery 56 │        36.96 / 37.11 ±0.10 / 37.28 ms │        37.30 / 37.38 ±0.07 / 37.48 ms │ no change │
│ QQuery 57 │     163.05 / 164.00 ±0.75 / 165.21 ms │     161.42 / 162.66 ±0.72 / 163.62 ms │ no change │
│ QQuery 58 │     104.70 / 105.35 ±0.43 / 105.92 ms │     104.22 / 104.68 ±0.34 / 105.20 ms │ no change │
│ QQuery 59 │     113.27 / 113.80 ±0.31 / 114.22 ms │     112.83 / 113.78 ±0.72 / 114.78 ms │ no change │
│ QQuery 60 │        37.02 / 37.61 ±0.34 / 37.93 ms │        37.42 / 37.60 ±0.12 / 37.78 ms │ no change │
│ QQuery 61 │           8.67 / 8.74 ±0.05 / 8.80 ms │           8.69 / 8.73 ±0.04 / 8.79 ms │ no change │
│ QQuery 62 │        42.76 / 43.13 ±0.23 / 43.34 ms │        41.93 / 42.53 ±0.41 / 43.10 ms │ no change │
│ QQuery 63 │        28.91 / 29.16 ±0.15 / 29.38 ms │        28.48 / 28.74 ±0.18 / 28.93 ms │ no change │
│ QQuery 64 │     243.37 / 245.49 ±1.81 / 248.51 ms │     243.04 / 245.13 ±1.52 / 246.90 ms │ no change │
│ QQuery 65 │        65.12 / 65.56 ±0.27 / 65.91 ms │        65.29 / 65.65 ±0.19 / 65.81 ms │ no change │
│ QQuery 66 │        72.40 / 73.03 ±0.69 / 74.38 ms │        71.92 / 72.59 ±0.45 / 73.06 ms │ no change │
│ QQuery 67 │     212.20 / 215.65 ±4.39 / 224.27 ms │     208.68 / 213.95 ±3.40 / 218.48 ms │ no change │
│ QQuery 68 │           6.25 / 6.35 ±0.12 / 6.57 ms │           6.25 / 6.41 ±0.16 / 6.71 ms │ no change │
│ QQuery 69 │        55.27 / 55.61 ±0.23 / 55.89 ms │        55.24 / 55.73 ±0.28 / 56.06 ms │ no change │
│ QQuery 70 │        78.19 / 78.62 ±0.29 / 79.08 ms │        77.14 / 77.53 ±0.34 / 78.11 ms │ no change │
│ QQuery 71 │        34.01 / 34.40 ±0.26 / 34.73 ms │        34.33 / 34.49 ±0.18 / 34.82 ms │ no change │
│ QQuery 72 │ 1434.12 / 1461.61 ±21.00 / 1491.34 ms │ 1406.41 / 1437.49 ±32.00 / 1493.86 ms │ no change │
│ QQuery 73 │           5.23 / 5.27 ±0.03 / 5.33 ms │           5.12 / 5.18 ±0.04 / 5.25 ms │ no change │
│ QQuery 74 │     146.67 / 148.98 ±1.66 / 151.71 ms │     143.79 / 144.99 ±1.12 / 146.92 ms │ no change │
│ QQuery 75 │     131.15 / 131.42 ±0.27 / 131.87 ms │     130.34 / 130.63 ±0.38 / 131.37 ms │ no change │
│ QQuery 76 │        33.62 / 33.89 ±0.21 / 34.19 ms │        32.59 / 33.29 ±0.42 / 33.84 ms │ no change │
│ QQuery 77 │        58.77 / 59.69 ±0.54 / 60.25 ms │        58.23 / 58.75 ±0.40 / 59.37 ms │ no change │
│ QQuery 78 │     246.28 / 247.63 ±0.84 / 248.60 ms │     246.44 / 249.14 ±1.72 / 251.17 ms │ no change │
│ QQuery 79 │        67.93 / 68.14 ±0.18 / 68.44 ms │        67.22 / 68.47 ±0.78 / 69.55 ms │ no change │
│ QQuery 80 │        90.26 / 91.22 ±0.64 / 92.26 ms │        90.10 / 91.21 ±0.89 / 92.51 ms │ no change │
│ QQuery 81 │        24.79 / 25.08 ±0.20 / 25.41 ms │        25.55 / 25.72 ±0.11 / 25.84 ms │ no change │
│ QQuery 82 │        16.06 / 16.10 ±0.05 / 16.20 ms │        16.25 / 16.52 ±0.22 / 16.82 ms │ no change │
│ QQuery 83 │        31.67 / 31.94 ±0.19 / 32.25 ms │        31.80 / 31.96 ±0.18 / 32.25 ms │ no change │
│ QQuery 84 │        28.50 / 28.67 ±0.19 / 29.03 ms │        28.64 / 28.94 ±0.22 / 29.29 ms │ no change │
│ QQuery 85 │        95.72 / 96.19 ±0.44 / 96.80 ms │        95.14 / 95.73 ±0.43 / 96.23 ms │ no change │
│ QQuery 86 │        24.43 / 24.78 ±0.31 / 25.36 ms │        24.01 / 24.59 ±0.35 / 24.92 ms │ no change │
│ QQuery 87 │        58.22 / 58.83 ±0.43 / 59.36 ms │        58.53 / 59.39 ±0.78 / 60.73 ms │ no change │
│ QQuery 88 │        59.24 / 59.60 ±0.24 / 59.95 ms │        58.25 / 58.95 ±0.46 / 59.44 ms │ no change │
│ QQuery 89 │        34.02 / 34.29 ±0.14 / 34.42 ms │        33.36 / 33.87 ±0.37 / 34.31 ms │ no change │
│ QQuery 90 │        15.36 / 15.55 ±0.12 / 15.68 ms │        15.27 / 15.46 ±0.19 / 15.77 ms │ no change │
│ QQuery 91 │        40.02 / 40.15 ±0.15 / 40.43 ms │        39.00 / 39.36 ±0.18 / 39.50 ms │ no change │
│ QQuery 92 │        27.44 / 27.73 ±0.20 / 28.05 ms │        27.62 / 27.87 ±0.21 / 28.16 ms │ no change │
│ QQuery 93 │        47.10 / 47.54 ±0.31 / 47.93 ms │        46.11 / 46.73 ±0.39 / 47.18 ms │ no change │
│ QQuery 94 │        37.07 / 37.60 ±0.28 / 37.90 ms │        37.01 / 37.23 ±0.16 / 37.48 ms │ no change │
│ QQuery 95 │        75.73 / 76.08 ±0.30 / 76.46 ms │        75.42 / 75.69 ±0.29 / 76.23 ms │ no change │
│ QQuery 96 │        22.78 / 22.92 ±0.08 / 23.00 ms │        22.91 / 23.15 ±0.15 / 23.33 ms │ no change │
│ QQuery 97 │        48.39 / 48.59 ±0.15 / 48.81 ms │        47.92 / 48.44 ±0.32 / 48.80 ms │ no change │
│ QQuery 98 │        41.46 / 42.52 ±0.57 / 43.13 ms │        41.59 / 42.10 ±0.44 / 42.89 ms │ no change │
│ QQuery 99 │        64.64 / 65.00 ±0.31 / 65.42 ms │        62.67 / 63.16 ±0.26 / 63.42 ms │ no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                           ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                           │ 8308.23ms │
│ Total Time (fix-26411-sort-merge-handoff)   │ 8211.57ms │
│ Average Time (HEAD)                         │   83.92ms │
│ Average Time (fix-26411-sort-merge-handoff) │   82.95ms │
│ Queries Faster                              │         0 │
│ Queries Slower                              │         0 │
│ Queries with No Change                      │        99 │
│ Queries with Failure                        │         0 │
└─────────────────────────────────────────────┴───────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 2.6 GiB
Avg memory 1.9 GiB
CPU user 209.1s
CPU sys 4.7s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 50.0s
Peak memory 2.6 GiB
Avg memory 2.1 GiB
CPU user 209.0s
CPU sys 4.6s
Peak spill 0 B

File an issue against this benchmark runner

@comphead
comphead requested a review from sunchao December 5, 2026 01:03
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.

SortExec merge lookahead can retain batches without memory reservations

2 participants