Skip to content

perf(sort): passthrough last stream that left in SortPreservingMergeStream#23328

Open
rluvaton wants to merge 4 commits into
apache:mainfrom
rluvaton:passthrough-last-stream
Open

perf(sort): passthrough last stream that left in SortPreservingMergeStream#23328
rluvaton wants to merge 4 commits into
apache:mainfrom
rluvaton:passthrough-last-stream

Conversation

@rluvaton

@rluvaton rluvaton commented Jul 5, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

N/A

Rationale for this change

No need to go through the entire Loser tree mechanism when only 1 stream left, so in that case, just passthrough last stream

What changes are included in this PR?

added passthrough for last stream in SortPreservingMergeStream

Are these changes tested?

Yes, basic test + existing tests

Are there any user-facing changes?

No


FYI, this is one of many upcoming optimizations that I will do for Sort

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jul 5, 2026
@rluvaton rluvaton marked this pull request as draft July 5, 2026 21:46
@rluvaton

rluvaton commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

run benchmarks

@adriangbot

Copy link
Copy Markdown

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

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

Comparing passthrough-last-stream (d7156e6) to 6a0e76e (merge-base) diff using: clickbench_partitioned
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-c4896056824-871-npgfc 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

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

Comparing passthrough-last-stream (d7156e6) to 6a0e76e (merge-base) diff using: tpcds
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-c4896056824-872-9z9x9 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

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

Comparing passthrough-last-stream (d7156e6) to 6a0e76e (merge-base) diff using: tpch
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)

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 passthrough-last-stream
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃        passthrough-last-stream ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │ 38.64 / 40.36 ±2.93 / 46.22 ms │ 38.30 / 39.91 ±1.70 / 42.00 ms │     no change │
│ QQuery 2  │ 19.32 / 19.96 ±0.56 / 20.88 ms │ 19.28 / 19.50 ±0.17 / 19.72 ms │     no change │
│ QQuery 3  │ 30.70 / 33.46 ±2.25 / 36.94 ms │ 30.86 / 32.27 ±1.29 / 33.96 ms │     no change │
│ QQuery 4  │ 17.60 / 17.91 ±0.23 / 18.17 ms │ 17.68 / 17.80 ±0.11 / 18.00 ms │     no change │
│ QQuery 5  │ 38.81 / 41.79 ±1.79 / 43.83 ms │ 37.89 / 39.28 ±1.47 / 41.09 ms │ +1.06x faster │
│ QQuery 6  │ 16.31 / 17.30 ±0.96 / 18.57 ms │ 16.34 / 16.70 ±0.49 / 17.58 ms │     no change │
│ QQuery 7  │ 45.02 / 47.78 ±2.45 / 51.56 ms │ 43.66 / 46.26 ±2.10 / 49.38 ms │     no change │
│ QQuery 8  │ 43.59 / 44.52 ±1.44 / 47.36 ms │ 43.29 / 43.59 ±0.21 / 43.85 ms │     no change │
│ QQuery 9  │ 50.39 / 50.84 ±0.50 / 51.73 ms │ 48.97 / 50.52 ±1.33 / 52.71 ms │     no change │
│ QQuery 10 │ 42.89 / 43.58 ±0.86 / 45.23 ms │ 42.36 / 42.48 ±0.10 / 42.61 ms │     no change │
│ QQuery 11 │ 13.72 / 14.25 ±0.58 / 15.28 ms │ 13.79 / 14.11 ±0.41 / 14.91 ms │     no change │
│ QQuery 12 │ 24.22 / 24.63 ±0.45 / 25.46 ms │ 24.22 / 24.52 ±0.28 / 24.93 ms │     no change │
│ QQuery 13 │ 32.55 / 34.50 ±1.41 / 36.90 ms │ 34.31 / 35.19 ±0.76 / 36.39 ms │     no change │
│ QQuery 14 │ 24.09 / 24.17 ±0.06 / 24.28 ms │ 23.76 / 23.95 ±0.16 / 24.21 ms │     no change │
│ QQuery 15 │ 31.33 / 31.98 ±0.55 / 32.90 ms │ 31.29 / 32.17 ±0.84 / 33.74 ms │     no change │
│ QQuery 16 │ 14.07 / 14.27 ±0.12 / 14.42 ms │ 14.02 / 14.43 ±0.27 / 14.85 ms │     no change │
│ QQuery 17 │ 74.23 / 74.74 ±0.38 / 75.38 ms │ 73.37 / 74.89 ±1.46 / 77.68 ms │     no change │
│ QQuery 18 │ 58.86 / 60.98 ±1.20 / 62.27 ms │ 57.31 / 59.72 ±1.42 / 61.34 ms │     no change │
│ QQuery 19 │ 33.37 / 34.08 ±1.05 / 36.16 ms │ 33.14 / 33.80 ±0.61 / 34.83 ms │     no change │
│ QQuery 20 │ 32.40 / 32.91 ±0.56 / 33.78 ms │ 31.63 / 32.18 ±0.50 / 33.01 ms │     no change │
│ QQuery 21 │ 55.93 / 58.17 ±1.48 / 59.77 ms │ 55.62 / 57.02 ±1.26 / 59.30 ms │     no change │
│ QQuery 22 │ 14.22 / 14.42 ±0.16 / 14.65 ms │ 14.23 / 14.52 ±0.29 / 15.04 ms │     no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                      ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                      │ 776.61ms │
│ Total Time (passthrough-last-stream)   │ 764.79ms │
│ Average Time (HEAD)                    │  35.30ms │
│ Average Time (passthrough-last-stream) │  34.76ms │
│ Queries Faster                         │        1 │
│ Queries Slower                         │        0 │
│ Queries with No Change                 │       21 │
│ Queries with Failure                   │        0 │
└────────────────────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

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

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 1.2 GiB
Avg memory 513.8 MiB
CPU user 22.0s
CPU sys 1.6s
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)

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 passthrough-last-stream
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃               passthrough-last-stream ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           5.77 / 6.23 ±0.84 / 7.92 ms │           5.58 / 6.05 ±0.85 / 7.75 ms │     no change │
│ QQuery 2  │        82.01 / 82.41 ±0.24 / 82.67 ms │        80.10 / 80.42 ±0.24 / 80.81 ms │     no change │
│ QQuery 3  │        29.65 / 29.89 ±0.24 / 30.31 ms │        29.18 / 29.43 ±0.18 / 29.63 ms │     no change │
│ QQuery 4  │     487.60 / 490.81 ±2.27 / 493.88 ms │     478.77 / 484.42 ±5.74 / 494.38 ms │     no change │
│ QQuery 5  │        52.50 / 53.24 ±0.54 / 54.17 ms │        51.75 / 55.25 ±4.97 / 65.02 ms │     no change │
│ QQuery 6  │        36.74 / 37.08 ±0.39 / 37.78 ms │        36.44 / 37.04 ±0.41 / 37.50 ms │     no change │
│ QQuery 7  │        94.96 / 95.97 ±0.57 / 96.45 ms │        94.72 / 94.92 ±0.14 / 95.06 ms │     no change │
│ QQuery 8  │        37.37 / 39.00 ±2.27 / 43.40 ms │        36.60 / 38.84 ±3.26 / 45.32 ms │     no change │
│ QQuery 9  │        51.86 / 54.85 ±2.19 / 58.09 ms │        53.18 / 54.72 ±1.61 / 57.77 ms │     no change │
│ QQuery 10 │        63.92 / 64.18 ±0.31 / 64.75 ms │        63.27 / 63.72 ±0.40 / 64.30 ms │     no change │
│ QQuery 11 │     306.33 / 312.69 ±6.46 / 324.57 ms │     297.26 / 302.73 ±3.94 / 307.64 ms │     no change │
│ QQuery 12 │        28.89 / 29.25 ±0.20 / 29.50 ms │        28.34 / 28.95 ±0.49 / 29.79 ms │     no change │
│ QQuery 13 │     119.69 / 120.71 ±1.35 / 123.29 ms │     117.74 / 118.51 ±0.54 / 119.41 ms │     no change │
│ QQuery 14 │     418.48 / 421.40 ±1.56 / 422.97 ms │     411.13 / 417.78 ±3.53 / 420.79 ms │     no change │
│ QQuery 15 │        57.61 / 58.64 ±1.10 / 60.33 ms │        57.07 / 58.03 ±0.74 / 59.33 ms │     no change │
│ QQuery 16 │           6.90 / 7.02 ±0.11 / 7.23 ms │           6.67 / 6.85 ±0.16 / 7.13 ms │     no change │
│ QQuery 17 │        81.05 / 82.53 ±1.82 / 86.05 ms │        80.48 / 81.80 ±1.54 / 84.80 ms │     no change │
│ QQuery 18 │     124.04 / 125.73 ±1.10 / 127.13 ms │     124.74 / 125.92 ±1.09 / 127.77 ms │     no change │
│ QQuery 19 │        41.94 / 42.18 ±0.23 / 42.56 ms │        41.74 / 42.13 ±0.31 / 42.49 ms │     no change │
│ QQuery 20 │        36.42 / 37.20 ±0.97 / 39.10 ms │        35.30 / 35.84 ±0.47 / 36.59 ms │     no change │
│ QQuery 21 │        17.45 / 18.38 ±1.17 / 20.68 ms │        17.48 / 17.64 ±0.18 / 17.96 ms │     no change │
│ QQuery 22 │        62.01 / 64.28 ±1.86 / 67.02 ms │        62.41 / 63.21 ±0.60 / 63.75 ms │     no change │
│ QQuery 23 │     347.27 / 351.33 ±3.62 / 357.06 ms │     345.49 / 350.03 ±4.67 / 357.78 ms │     no change │
│ QQuery 24 │     227.15 / 230.61 ±4.71 / 239.53 ms │     226.11 / 229.31 ±3.21 / 235.37 ms │     no change │
│ QQuery 25 │     111.48 / 112.47 ±0.88 / 113.91 ms │     110.27 / 111.36 ±0.68 / 112.28 ms │     no change │
│ QQuery 26 │        58.31 / 60.60 ±2.57 / 65.44 ms │        58.03 / 59.99 ±2.18 / 64.06 ms │     no change │
│ QQuery 27 │           6.63 / 6.77 ±0.12 / 7.00 ms │           6.50 / 6.63 ±0.15 / 6.92 ms │     no change │
│ QQuery 28 │        57.39 / 60.86 ±1.76 / 62.12 ms │        60.42 / 61.66 ±1.06 / 63.57 ms │     no change │
│ QQuery 29 │      97.87 / 101.39 ±3.74 / 107.73 ms │        96.78 / 98.27 ±1.06 / 99.48 ms │     no change │
│ QQuery 30 │        32.90 / 33.82 ±0.84 / 35.21 ms │        33.22 / 34.63 ±2.16 / 38.92 ms │     no change │
│ QQuery 31 │     112.95 / 113.38 ±0.45 / 114.22 ms │     111.76 / 112.63 ±0.86 / 114.25 ms │     no change │
│ QQuery 32 │        20.67 / 21.14 ±0.32 / 21.62 ms │        20.45 / 21.03 ±0.29 / 21.22 ms │     no change │
│ QQuery 33 │        38.89 / 39.24 ±0.39 / 39.96 ms │        38.11 / 39.62 ±2.06 / 43.70 ms │     no change │
│ QQuery 34 │        10.08 / 10.61 ±0.50 / 11.38 ms │        10.13 / 10.97 ±1.00 / 12.83 ms │     no change │
│ QQuery 35 │        74.37 / 74.83 ±0.39 / 75.50 ms │        73.00 / 74.79 ±1.22 / 76.61 ms │     no change │
│ QQuery 36 │           5.95 / 6.12 ±0.18 / 6.47 ms │           5.88 / 6.05 ±0.18 / 6.39 ms │     no change │
│ QQuery 37 │           7.07 / 7.17 ±0.06 / 7.25 ms │           7.03 / 7.15 ±0.08 / 7.28 ms │     no change │
│ QQuery 38 │        63.51 / 63.86 ±0.44 / 64.72 ms │        62.76 / 62.99 ±0.21 / 63.29 ms │     no change │
│ QQuery 39 │        92.95 / 95.46 ±2.51 / 99.15 ms │        89.57 / 93.06 ±3.46 / 99.41 ms │     no change │
│ QQuery 40 │        24.59 / 25.00 ±0.61 / 26.19 ms │        23.68 / 24.11 ±0.29 / 24.57 ms │     no change │
│ QQuery 41 │        11.78 / 12.01 ±0.22 / 12.41 ms │        11.59 / 11.75 ±0.20 / 12.14 ms │     no change │
│ QQuery 42 │        24.63 / 25.29 ±0.58 / 26.24 ms │        23.72 / 24.06 ±0.23 / 24.39 ms │     no change │
│ QQuery 43 │           5.19 / 5.28 ±0.15 / 5.58 ms │           5.04 / 5.16 ±0.15 / 5.46 ms │     no change │
│ QQuery 44 │           9.73 / 9.85 ±0.11 / 9.97 ms │          9.61 / 9.73 ±0.14 / 10.00 ms │     no change │
│ QQuery 45 │        39.06 / 39.93 ±0.91 / 41.43 ms │        37.86 / 38.76 ±0.61 / 39.61 ms │     no change │
│ QQuery 46 │        12.31 / 12.78 ±0.29 / 13.05 ms │        11.75 / 11.96 ±0.19 / 12.30 ms │ +1.07x faster │
│ QQuery 47 │     231.59 / 235.46 ±5.10 / 245.02 ms │     224.36 / 228.48 ±4.91 / 237.98 ms │     no change │
│ QQuery 48 │        98.31 / 98.84 ±0.34 / 99.22 ms │        96.44 / 97.31 ±0.74 / 98.60 ms │     no change │
│ QQuery 49 │        78.10 / 78.56 ±0.59 / 79.71 ms │        76.31 / 77.48 ±0.70 / 78.04 ms │     no change │
│ QQuery 50 │        59.85 / 61.44 ±2.21 / 65.79 ms │        58.81 / 59.78 ±0.65 / 60.57 ms │     no change │
│ QQuery 51 │        93.12 / 94.80 ±1.00 / 95.97 ms │        91.64 / 93.27 ±1.54 / 96.01 ms │     no change │
│ QQuery 52 │        24.27 / 26.44 ±3.22 / 32.80 ms │        23.90 / 24.43 ±0.33 / 24.77 ms │ +1.08x faster │
│ QQuery 53 │        30.23 / 31.21 ±1.08 / 33.31 ms │        29.50 / 29.69 ±0.12 / 29.84 ms │     no change │
│ QQuery 54 │        56.53 / 56.95 ±0.35 / 57.48 ms │        55.66 / 58.36 ±3.15 / 64.51 ms │     no change │
│ QQuery 55 │        23.80 / 24.45 ±0.39 / 24.79 ms │        23.71 / 24.13 ±0.39 / 24.85 ms │     no change │
│ QQuery 56 │        40.26 / 40.90 ±0.44 / 41.39 ms │        40.12 / 40.54 ±0.37 / 41.11 ms │     no change │
│ QQuery 57 │     179.39 / 181.19 ±3.09 / 187.33 ms │     175.41 / 178.34 ±2.06 / 180.94 ms │     no change │
│ QQuery 58 │     118.16 / 119.18 ±0.67 / 119.93 ms │     114.15 / 116.08 ±1.68 / 118.89 ms │     no change │
│ QQuery 59 │     120.67 / 121.07 ±0.36 / 121.66 ms │     117.74 / 118.76 ±0.80 / 120.16 ms │     no change │
│ QQuery 60 │        41.30 / 42.48 ±1.39 / 45.18 ms │        40.05 / 40.53 ±0.44 / 41.24 ms │     no change │
│ QQuery 61 │        12.97 / 13.40 ±0.64 / 14.67 ms │        12.90 / 13.03 ±0.18 / 13.38 ms │     no change │
│ QQuery 62 │        47.39 / 47.60 ±0.28 / 48.14 ms │        46.29 / 47.88 ±2.25 / 52.33 ms │     no change │
│ QQuery 63 │        30.25 / 30.83 ±0.42 / 31.53 ms │        29.67 / 30.23 ±0.37 / 30.83 ms │     no change │
│ QQuery 64 │     412.31 / 421.30 ±7.43 / 434.33 ms │     408.66 / 413.42 ±4.12 / 419.03 ms │     no change │
│ QQuery 65 │     148.44 / 150.19 ±1.23 / 151.65 ms │     143.87 / 147.51 ±2.30 / 150.96 ms │     no change │
│ QQuery 66 │        79.81 / 80.19 ±0.45 / 81.05 ms │        79.56 / 79.76 ±0.16 / 79.97 ms │     no change │
│ QQuery 67 │     240.44 / 247.90 ±8.64 / 264.84 ms │     238.53 / 241.33 ±2.73 / 245.00 ms │     no change │
│ QQuery 68 │        12.14 / 16.13 ±6.62 / 29.26 ms │        11.80 / 12.03 ±0.20 / 12.40 ms │ +1.34x faster │
│ QQuery 69 │        58.21 / 59.03 ±0.57 / 59.96 ms │        57.50 / 58.10 ±0.35 / 58.45 ms │     no change │
│ QQuery 70 │     105.60 / 108.98 ±4.22 / 117.26 ms │     105.21 / 110.12 ±7.15 / 124.18 ms │     no change │
│ QQuery 71 │        35.83 / 39.34 ±6.39 / 52.12 ms │        35.56 / 36.49 ±1.18 / 38.76 ms │ +1.08x faster │
│ QQuery 72 │ 2090.55 / 2177.11 ±72.94 / 2310.24 ms │ 1992.06 / 2081.20 ±53.68 / 2147.84 ms │     no change │
│ QQuery 73 │         9.87 / 14.06 ±7.99 / 30.04 ms │         9.83 / 10.22 ±0.51 / 11.21 ms │ +1.38x faster │
│ QQuery 74 │     171.86 / 175.28 ±3.92 / 181.77 ms │     166.75 / 171.12 ±4.48 / 178.97 ms │     no change │
│ QQuery 75 │     150.92 / 155.81 ±5.93 / 167.17 ms │     149.08 / 151.60 ±2.32 / 155.14 ms │     no change │
│ QQuery 76 │        35.88 / 36.50 ±0.47 / 37.30 ms │        35.46 / 35.72 ±0.14 / 35.85 ms │     no change │
│ QQuery 77 │        62.26 / 65.91 ±4.59 / 74.85 ms │        62.91 / 65.09 ±2.14 / 69.09 ms │     no change │
│ QQuery 78 │     197.88 / 202.38 ±5.55 / 211.47 ms │     195.18 / 198.65 ±2.02 / 201.49 ms │     no change │
│ QQuery 79 │        67.26 / 67.79 ±0.30 / 68.18 ms │        67.30 / 68.05 ±0.85 / 69.66 ms │     no change │
│ QQuery 80 │      99.75 / 102.54 ±4.32 / 111.12 ms │      98.51 / 100.36 ±1.74 / 103.50 ms │     no change │
│ QQuery 81 │        26.53 / 28.00 ±2.17 / 32.28 ms │        25.95 / 26.93 ±1.29 / 29.45 ms │     no change │
│ QQuery 82 │        16.85 / 17.43 ±0.54 / 18.12 ms │        16.68 / 17.01 ±0.22 / 17.25 ms │     no change │
│ QQuery 83 │        40.75 / 41.05 ±0.43 / 41.90 ms │        40.38 / 40.95 ±0.85 / 42.65 ms │     no change │
│ QQuery 84 │        30.40 / 30.77 ±0.33 / 31.37 ms │        30.45 / 30.74 ±0.40 / 31.54 ms │     no change │
│ QQuery 85 │     107.82 / 111.37 ±4.68 / 120.09 ms │     106.65 / 107.42 ±0.66 / 108.53 ms │     no change │
│ QQuery 86 │        25.23 / 25.76 ±0.38 / 26.30 ms │        25.09 / 25.28 ±0.14 / 25.49 ms │     no change │
│ QQuery 87 │        63.21 / 64.24 ±0.79 / 65.32 ms │        62.51 / 63.90 ±0.94 / 64.98 ms │     no change │
│ QQuery 88 │        63.67 / 64.33 ±0.35 / 64.70 ms │        63.36 / 63.84 ±0.34 / 64.42 ms │     no change │
│ QQuery 89 │        36.47 / 39.26 ±4.18 / 47.52 ms │        36.30 / 38.08 ±3.07 / 44.21 ms │     no change │
│ QQuery 90 │        17.63 / 17.79 ±0.17 / 18.01 ms │        17.30 / 17.97 ±0.96 / 19.87 ms │     no change │
│ QQuery 91 │        47.15 / 47.42 ±0.19 / 47.63 ms │        46.71 / 47.24 ±0.42 / 47.79 ms │     no change │
│ QQuery 92 │        29.29 / 30.17 ±0.82 / 31.52 ms │        29.13 / 29.82 ±0.53 / 30.44 ms │     no change │
│ QQuery 93 │        50.64 / 51.39 ±0.47 / 52.09 ms │        50.02 / 50.60 ±0.45 / 51.38 ms │     no change │
│ QQuery 94 │        38.77 / 41.23 ±3.92 / 49.03 ms │        37.90 / 39.95 ±2.51 / 44.76 ms │     no change │
│ QQuery 95 │        82.05 / 84.06 ±1.98 / 87.80 ms │        82.12 / 83.61 ±1.10 / 85.38 ms │     no change │
│ QQuery 96 │        24.31 / 24.62 ±0.31 / 25.15 ms │        24.10 / 24.48 ±0.37 / 25.17 ms │     no change │
│ QQuery 97 │        46.63 / 47.04 ±0.24 / 47.27 ms │        46.32 / 46.50 ±0.15 / 46.77 ms │     no change │
│ QQuery 98 │        42.27 / 43.23 ±0.85 / 44.52 ms │        41.95 / 44.11 ±2.98 / 50.01 ms │     no change │
│ QQuery 99 │        70.29 / 70.66 ±0.33 / 71.16 ms │        70.13 / 70.65 ±0.83 / 72.29 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                      ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                      │ 10098.46ms │
│ Total Time (passthrough-last-stream)   │  9878.11ms │
│ Average Time (HEAD)                    │   102.00ms │
│ Average Time (passthrough-last-stream) │    99.78ms │
│ Queries Faster                         │          5 │
│ Queries Slower                         │          0 │
│ Queries with No Change                 │         94 │
│ Queries with Failure                   │          0 │
└────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 2.0 GiB
Avg memory 1.3 GiB
CPU user 227.5s
CPU sys 6.2s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 50.0s
Peak memory 2.1 GiB
Avg memory 1.5 GiB
CPU user 220.9s
CPU sys 6.0s
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)

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 passthrough-last-stream
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                   HEAD ┃               passthrough-last-stream ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │           1.24 / 3.98 ±5.40 / 14.79 ms │          1.23 / 3.97 ±5.40 / 14.77 ms │     no change │
│ QQuery 1  │         12.53 / 12.91 ±0.23 / 13.16 ms │        12.46 / 12.69 ±0.13 / 12.82 ms │     no change │
│ QQuery 2  │         36.74 / 37.10 ±0.35 / 37.65 ms │        35.30 / 35.50 ±0.26 / 36.02 ms │     no change │
│ QQuery 3  │         30.64 / 31.74 ±1.34 / 34.37 ms │        30.14 / 30.38 ±0.32 / 30.98 ms │     no change │
│ QQuery 4  │      220.89 / 225.12 ±2.65 / 229.20 ms │     221.16 / 227.13 ±4.08 / 232.89 ms │     no change │
│ QQuery 5  │      276.47 / 278.52 ±2.99 / 284.46 ms │     275.93 / 277.83 ±1.65 / 280.70 ms │     no change │
│ QQuery 6  │            1.30 / 1.46 ±0.24 / 1.94 ms │           1.27 / 1.41 ±0.22 / 1.84 ms │     no change │
│ QQuery 7  │         13.97 / 14.33 ±0.34 / 14.90 ms │        13.62 / 14.13 ±0.31 / 14.45 ms │     no change │
│ QQuery 8  │     323.98 / 336.18 ±16.50 / 368.85 ms │     321.06 / 325.37 ±4.28 / 333.41 ms │     no change │
│ QQuery 9  │     494.47 / 521.56 ±19.74 / 542.40 ms │    459.87 / 477.26 ±28.03 / 532.57 ms │ +1.09x faster │
│ QQuery 10 │         71.90 / 72.53 ±0.44 / 73.01 ms │        70.59 / 71.85 ±1.29 / 74.26 ms │     no change │
│ QQuery 11 │         82.80 / 84.07 ±0.86 / 85.49 ms │        81.53 / 82.71 ±1.73 / 86.10 ms │     no change │
│ QQuery 12 │      272.72 / 276.46 ±4.03 / 283.38 ms │    267.63 / 286.23 ±17.08 / 311.32 ms │     no change │
│ QQuery 13 │      371.44 / 376.59 ±2.76 / 379.22 ms │    409.98 / 424.60 ±13.45 / 447.20 ms │  1.13x slower │
│ QQuery 14 │      287.12 / 291.06 ±3.28 / 295.09 ms │    286.15 / 301.22 ±14.16 / 327.74 ms │     no change │
│ QQuery 15 │      274.06 / 279.41 ±5.64 / 289.41 ms │     269.90 / 283.96 ±9.60 / 299.41 ms │     no change │
│ QQuery 16 │      618.69 / 629.81 ±7.66 / 640.46 ms │     609.26 / 621.65 ±9.06 / 632.70 ms │     no change │
│ QQuery 17 │      625.46 / 638.15 ±7.26 / 646.57 ms │    615.90 / 660.14 ±52.03 / 757.58 ms │     no change │
│ QQuery 18 │ 1266.62 / 1363.60 ±106.12 / 1518.84 ms │ 1277.23 / 1308.56 ±45.81 / 1399.44 ms │     no change │
│ QQuery 19 │        28.87 / 35.04 ±11.81 / 58.65 ms │       27.48 / 35.61 ±16.03 / 67.67 ms │     no change │
│ QQuery 20 │      520.77 / 529.54 ±7.51 / 542.33 ms │     517.35 / 522.49 ±4.92 / 530.73 ms │     no change │
│ QQuery 21 │      516.06 / 521.79 ±4.25 / 528.50 ms │     512.71 / 518.20 ±5.49 / 525.82 ms │     no change │
│ QQuery 22 │   995.28 / 1024.92 ±25.58 / 1056.18 ms │    981.25 / 992.80 ±6.75 / 1001.57 ms │     no change │
│ QQuery 23 │  3114.47 / 3138.87 ±27.82 / 3189.13 ms │ 3133.73 / 3226.42 ±55.58 / 3290.41 ms │     no change │
│ QQuery 24 │         41.44 / 42.41 ±0.73 / 43.62 ms │        42.10 / 47.24 ±8.85 / 64.90 ms │  1.11x slower │
│ QQuery 25 │      112.45 / 114.91 ±1.84 / 118.15 ms │     113.76 / 114.63 ±0.84 / 116.22 ms │     no change │
│ QQuery 26 │         42.24 / 43.68 ±1.77 / 47.12 ms │        41.97 / 42.28 ±0.29 / 42.80 ms │     no change │
│ QQuery 27 │     681.52 / 703.81 ±12.18 / 716.72 ms │     670.38 / 676.21 ±6.43 / 688.48 ms │     no change │
│ QQuery 28 │  3052.80 / 3090.05 ±39.03 / 3141.74 ms │ 3025.28 / 3089.54 ±62.09 / 3203.71 ms │     no change │
│ QQuery 29 │        40.91 / 49.09 ±15.56 / 80.21 ms │        40.55 / 44.14 ±6.58 / 57.30 ms │ +1.11x faster │
│ QQuery 30 │      297.86 / 305.71 ±4.76 / 312.50 ms │     301.65 / 305.71 ±3.79 / 312.80 ms │     no change │
│ QQuery 31 │     290.15 / 303.55 ±20.05 / 343.16 ms │    278.28 / 292.89 ±10.18 / 307.05 ms │     no change │
│ QQuery 32 │    927.53 / 964.78 ±30.72 / 1005.05 ms │   929.25 / 969.80 ±40.72 / 1047.56 ms │     no change │
│ QQuery 33 │  1477.42 / 1564.61 ±72.68 / 1656.80 ms │ 1496.36 / 1568.97 ±84.66 / 1734.65 ms │     no change │
│ QQuery 34 │  1467.56 / 1554.49 ±81.72 / 1693.14 ms │ 1509.73 / 1526.34 ±10.08 / 1537.24 ms │     no change │
│ QQuery 35 │     280.89 / 308.21 ±28.28 / 358.10 ms │    295.81 / 358.90 ±54.88 / 457.38 ms │  1.16x slower │
│ QQuery 36 │         67.27 / 76.41 ±9.07 / 90.00 ms │        77.23 / 81.71 ±5.38 / 92.11 ms │  1.07x slower │
│ QQuery 37 │         35.84 / 37.49 ±2.53 / 42.51 ms │        38.45 / 42.77 ±4.88 / 51.94 ms │  1.14x slower │
│ QQuery 38 │         39.89 / 50.33 ±8.30 / 60.89 ms │        45.04 / 53.83 ±9.79 / 72.22 ms │  1.07x slower │
│ QQuery 39 │      132.58 / 146.74 ±7.18 / 151.38 ms │    155.64 / 175.75 ±13.21 / 193.60 ms │  1.20x slower │
│ QQuery 40 │         13.90 / 14.33 ±0.45 / 15.19 ms │        15.43 / 17.75 ±2.26 / 21.18 ms │  1.24x slower │
│ QQuery 41 │         13.69 / 14.13 ±0.34 / 14.53 ms │        14.79 / 14.96 ±0.15 / 15.17 ms │  1.06x slower │
│ QQuery 42 │         13.30 / 16.75 ±4.62 / 25.22 ms │        14.03 / 15.78 ±2.99 / 21.74 ms │ +1.06x faster │
└───────────┴────────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                      ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                      │ 20126.23ms │
│ Total Time (passthrough-last-stream)   │ 20181.29ms │
│ Average Time (HEAD)                    │   468.05ms │
│ Average Time (passthrough-last-stream) │   469.33ms │
│ Queries Faster                         │          3 │
│ Queries Slower                         │          9 │
│ Queries with No Change                 │         31 │
│ Queries with Failure                   │          0 │
└────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 105.0s
Peak memory 11.8 GiB
Avg memory 4.6 GiB
CPU user 1033.9s
CPU sys 68.6s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 105.0s
Peak memory 11.4 GiB
Avg memory 4.2 GiB
CPU user 1034.6s
CPU sys 71.2s
Peak spill 0 B

File an issue against this benchmark runner

@github-actions github-actions Bot added the core Core DataFusion crate label Jul 6, 2026
@rluvaton rluvaton force-pushed the passthrough-last-stream branch from aee6ced to ed18da7 Compare July 6, 2026 21:21
@rluvaton rluvaton added the performance Make DataFusion faster label Jul 6, 2026
@rluvaton rluvaton marked this pull request as ready for review July 6, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate performance Make DataFusion faster physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants