Skip to content

Add DecomposeAggregate optimizer to rewrite AVG as SUM/COUNT#21613

Open
Dandandan wants to merge 9 commits intoapache:mainfrom
Dandandan:decompose-avg-optimization
Open

Add DecomposeAggregate optimizer to rewrite AVG as SUM/COUNT#21613
Dandandan wants to merge 9 commits intoapache:mainfrom
Dandandan:decompose-avg-optimization

Conversation

@Dandandan
Copy link
Copy Markdown
Contributor

@Dandandan Dandandan commented Apr 14, 2026

Which issue does this close?

Closes: #19637

Summary

  • Adds a new DecomposeAggregate optimizer rule that rewrites AVG(x) into CAST(SUM(x) AS Float64) / CAST(COUNT(*) AS Float64)
  • Reduces accumulator overhead: AVG stores sum + count per group internally; splitting into separate SUM and COUNT accumulators is more efficient
  • Uses COUNT(*) for non-nullable args (enables sharing with existing COUNT(*) via CSE), falls back to COUNT(x) for nullable args
  • Only applies to AVG with Float64 return type; skips DISTINCT, filtered, ordered, and decimal/duration AVGs

Test plan

  • Unit tests for the optimizer rule (7 tests covering: no AVG, simple AVG, AVG with other aggregates, DISTINCT AVG skip, filtered AVG skip, multiple AVGs, no group-by)
  • All sqllogic tests pass (aggregate, clickbench, tpch, explain, etc.)
  • cargo fmt and cargo clippy clean

🤖 Generated with Claude Code

@github-actions github-actions bot added optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt) labels Apr 14, 2026
@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmarks

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4242929147-1214-8sdhg 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (faea6b4) to 29c5dd5 (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-c4242929147-1215-577v9 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (faea6b4) to 29c5dd5 (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-c4242929147-1216-n4qc6 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (faea6b4) to 29c5dd5 (merge-base) diff using: tpch
Results will be posted here when complete


File an issue against this benchmark runner

Dandandan and others added 2 commits April 14, 2026 12:01
Rewrites AVG(x) into CAST(SUM(x) AS Float64) / CAST(COUNT(*) AS Float64)
to reduce accumulator overhead. The AVG accumulator stores both sum and
count per group internally; splitting into separate SUM and COUNT
accumulators is more efficient and enables sharing with existing COUNT(*)
aggregates in the same query via CommonSubexprEliminate.

Uses COUNT(*) when the AVG argument is non-nullable (the common case for
integer/float columns), falling back to COUNT(x) for nullable arguments
to preserve correct NULL semantics. Only applies to AVG with Float64
return type; skips DISTINCT, filtered, ordered, and decimal/duration AVGs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ROLLUP/CUBE/GROUPING SETS expand group_expr into more schema fields
than group_expr.len(), which breaks the index arithmetic used to locate
aggregate field types. Skip these cases to avoid FieldNotFound errors
in downstream optimizer rules like optimize_projections.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Dandandan Dandandan force-pushed the decompose-avg-optimization branch from bbe9058 to 4b81d40 Compare April 14, 2026 10:02
@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 decompose-avg-optimization
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                   HEAD ┃            decompose-avg-optimization ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │           1.19 / 4.37 ±6.30 / 16.97 ms │          1.21 / 4.39 ±6.28 / 16.95 ms │     no change │
│ QQuery 1  │         14.40 / 14.63 ±0.22 / 14.97 ms │        14.44 / 14.57 ±0.07 / 14.65 ms │     no change │
│ QQuery 2  │         43.57 / 44.09 ±0.49 / 44.96 ms │        43.91 / 44.20 ±0.23 / 44.47 ms │     no change │
│ QQuery 3  │         43.62 / 44.77 ±0.89 / 45.97 ms │        40.92 / 41.20 ±0.23 / 41.58 ms │ +1.09x faster │
│ QQuery 4  │      288.43 / 293.69 ±3.14 / 298.28 ms │     281.77 / 288.20 ±7.68 / 303.02 ms │     no change │
│ QQuery 5  │      340.07 / 343.34 ±2.16 / 346.48 ms │     336.95 / 341.99 ±3.84 / 347.90 ms │     no change │
│ QQuery 6  │            4.78 / 7.14 ±1.50 / 9.38 ms │           5.00 / 5.93 ±0.59 / 6.79 ms │ +1.21x faster │
│ QQuery 7  │         16.54 / 16.94 ±0.36 / 17.55 ms │       16.81 / 26.51 ±16.98 / 60.43 ms │  1.56x slower │
│ QQuery 8  │      408.09 / 416.86 ±8.81 / 432.54 ms │     402.86 / 414.68 ±9.02 / 423.99 ms │     no change │
│ QQuery 9  │      625.50 / 636.23 ±7.35 / 643.88 ms │     639.15 / 645.37 ±4.26 / 651.83 ms │     no change │
│ QQuery 10 │         91.73 / 93.26 ±2.00 / 97.10 ms │        91.80 / 94.16 ±1.97 / 96.33 ms │     no change │
│ QQuery 11 │      103.12 / 104.44 ±0.92 / 105.94 ms │     102.53 / 103.30 ±0.77 / 104.47 ms │     no change │
│ QQuery 12 │      335.73 / 341.74 ±5.47 / 349.45 ms │     330.26 / 339.06 ±4.75 / 343.20 ms │     no change │
│ QQuery 13 │     447.43 / 465.24 ±12.86 / 481.17 ms │     462.28 / 475.25 ±7.80 / 483.34 ms │     no change │
│ QQuery 14 │      341.15 / 344.11 ±1.76 / 345.97 ms │     342.65 / 348.72 ±4.91 / 355.08 ms │     no change │
│ QQuery 15 │     344.64 / 357.55 ±15.24 / 384.92 ms │    351.55 / 364.90 ±17.53 / 399.05 ms │     no change │
│ QQuery 16 │     691.46 / 714.65 ±19.88 / 751.22 ms │     711.04 / 715.42 ±2.66 / 717.96 ms │     no change │
│ QQuery 17 │     703.34 / 712.79 ±11.42 / 735.18 ms │     706.52 / 711.95 ±5.28 / 719.82 ms │     no change │
│ QQuery 18 │  1354.98 / 1462.04 ±55.41 / 1510.23 ms │ 1420.60 / 1459.60 ±29.76 / 1495.99 ms │     no change │
│ QQuery 19 │         36.77 / 37.88 ±1.37 / 40.57 ms │        35.40 / 37.42 ±1.97 / 40.94 ms │     no change │
│ QQuery 20 │     716.29 / 739.75 ±26.71 / 784.55 ms │    714.85 / 733.18 ±18.76 / 769.30 ms │     no change │
│ QQuery 21 │      761.80 / 771.25 ±7.74 / 785.14 ms │    757.45 / 772.49 ±12.48 / 795.00 ms │     no change │
│ QQuery 22 │   1136.01 / 1141.53 ±6.31 / 1153.67 ms │  1127.56 / 1131.36 ±4.57 / 1140.08 ms │     no change │
│ QQuery 23 │  3075.09 / 3120.06 ±27.03 / 3156.20 ms │ 3040.55 / 3066.36 ±15.39 / 3088.85 ms │     no change │
│ QQuery 24 │       98.83 / 101.14 ±3.38 / 107.69 ms │      99.53 / 102.54 ±2.22 / 105.13 ms │     no change │
│ QQuery 25 │      137.84 / 139.81 ±1.55 / 141.76 ms │     136.71 / 138.94 ±1.54 / 140.44 ms │     no change │
│ QQuery 26 │      101.09 / 103.28 ±1.80 / 105.62 ms │      96.40 / 102.83 ±3.34 / 105.96 ms │     no change │
│ QQuery 27 │      849.92 / 858.97 ±5.96 / 866.44 ms │     861.69 / 869.07 ±5.64 / 877.57 ms │     no change │
│ QQuery 28 │  3258.83 / 3297.77 ±21.13 / 3322.30 ms │ 3275.25 / 3308.25 ±16.58 / 3319.21 ms │     no change │
│ QQuery 29 │         50.31 / 55.22 ±4.44 / 63.25 ms │        49.79 / 53.55 ±3.20 / 57.64 ms │     no change │
│ QQuery 30 │      356.85 / 361.61 ±3.42 / 366.34 ms │     367.21 / 371.14 ±3.74 / 377.90 ms │     no change │
│ QQuery 31 │      365.04 / 375.77 ±6.82 / 384.59 ms │    366.94 / 379.23 ±10.24 / 393.46 ms │     no change │
│ QQuery 32 │ 1040.45 / 1167.57 ±108.91 / 1288.79 ms │ 1030.31 / 1053.65 ±31.48 / 1114.86 ms │ +1.11x faster │
│ QQuery 33 │  1442.01 / 1460.21 ±13.07 / 1481.61 ms │ 1452.08 / 1464.30 ±12.16 / 1484.85 ms │     no change │
│ QQuery 34 │  1438.11 / 1455.32 ±12.31 / 1470.00 ms │ 1452.92 / 1475.35 ±24.15 / 1520.33 ms │     no change │
│ QQuery 35 │      377.58 / 385.63 ±5.62 / 392.90 ms │     383.79 / 387.79 ±3.60 / 393.36 ms │     no change │
│ QQuery 36 │      114.32 / 119.45 ±3.34 / 122.56 ms │     116.51 / 121.50 ±3.77 / 127.27 ms │     no change │
│ QQuery 37 │         48.32 / 50.51 ±1.67 / 53.17 ms │        47.86 / 49.71 ±1.47 / 52.07 ms │     no change │
│ QQuery 38 │         74.29 / 75.71 ±1.51 / 77.66 ms │        75.49 / 77.20 ±1.36 / 79.15 ms │     no change │
│ QQuery 39 │      217.40 / 220.33 ±2.76 / 224.31 ms │     204.08 / 216.29 ±9.08 / 230.55 ms │     no change │
│ QQuery 40 │         21.58 / 24.20 ±3.08 / 30.11 ms │        22.29 / 24.95 ±1.49 / 26.52 ms │     no change │
│ QQuery 41 │         18.96 / 20.65 ±1.04 / 22.08 ms │        20.37 / 21.36 ±0.75 / 22.32 ms │     no change │
│ QQuery 42 │         18.73 / 20.41 ±2.04 / 24.33 ms │        19.70 / 19.94 ±0.26 / 20.39 ms │     no change │
└───────────┴────────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 22521.93ms │
│ Total Time (decompose-avg-optimization)   │ 22417.78ms │
│ Average Time (HEAD)                       │   523.77ms │
│ Average Time (decompose-avg-optimization) │   521.34ms │
│ Queries Faster                            │          3 │
│ Queries Slower                            │          1 │
│ Queries with No Change                    │         39 │
│ Queries with Failure                      │          0 │
└───────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 113.7s
Peak memory 40.5 GiB
Avg memory 30.1 GiB
CPU user 1068.2s
CPU sys 88.3s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 113.0s
Peak memory 37.3 GiB
Avg memory 27.3 GiB
CPU user 1069.1s
CPU sys 83.9s
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 decompose-avg-optimization
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃               decompose-avg-optimization ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │              6.77 / 7.21 ±0.83 / 8.87 ms │              6.85 / 7.28 ±0.75 / 8.77 ms │     no change │
│ QQuery 2  │        145.04 / 146.58 ±1.33 / 148.64 ms │        144.80 / 145.90 ±0.73 / 146.71 ms │     no change │
│ QQuery 3  │        112.91 / 113.37 ±0.25 / 113.60 ms │        112.87 / 114.37 ±1.21 / 116.30 ms │     no change │
│ QQuery 4  │    1309.75 / 1356.37 ±50.45 / 1452.75 ms │    1378.26 / 1392.45 ±11.54 / 1404.35 ms │     no change │
│ QQuery 5  │        176.33 / 178.29 ±1.12 / 179.55 ms │        171.25 / 172.55 ±1.41 / 175.30 ms │     no change │
│ QQuery 6  │       822.26 / 867.19 ±35.21 / 926.52 ms │       855.25 / 880.11 ±22.98 / 909.80 ms │     no change │
│ QQuery 7  │        341.51 / 343.95 ±1.47 / 345.58 ms │        341.01 / 345.97 ±2.70 / 349.04 ms │     no change │
│ QQuery 8  │        116.75 / 118.09 ±0.69 / 118.68 ms │        115.55 / 116.76 ±0.71 / 117.75 ms │     no change │
│ QQuery 9  │        101.29 / 101.95 ±0.47 / 102.59 ms │        102.07 / 104.71 ±2.64 / 108.38 ms │     no change │
│ QQuery 10 │        107.55 / 108.84 ±1.45 / 111.66 ms │        106.98 / 107.88 ±0.80 / 109.37 ms │     no change │
│ QQuery 11 │       912.73 / 933.92 ±14.09 / 946.79 ms │       941.61 / 963.32 ±16.95 / 983.76 ms │     no change │
│ QQuery 12 │           46.11 / 48.73 ±1.87 / 51.77 ms │           43.92 / 46.14 ±2.21 / 50.25 ms │ +1.06x faster │
│ QQuery 13 │        394.96 / 402.04 ±4.35 / 407.27 ms │        400.19 / 407.87 ±5.13 / 412.53 ms │     no change │
│ QQuery 14 │     992.47 / 1009.16 ±10.09 / 1021.48 ms │     1003.05 / 1012.40 ±7.64 / 1025.68 ms │     no change │
│ QQuery 15 │           15.04 / 15.75 ±0.61 / 16.80 ms │           15.50 / 17.01 ±1.58 / 19.79 ms │  1.08x slower │
│ QQuery 16 │              7.14 / 8.12 ±0.90 / 9.27 ms │              7.42 / 8.21 ±0.76 / 9.23 ms │     no change │
│ QQuery 17 │        226.12 / 229.33 ±1.80 / 231.29 ms │        228.04 / 230.52 ±1.43 / 231.80 ms │     no change │
│ QQuery 18 │        127.24 / 128.63 ±1.08 / 130.46 ms │        126.76 / 128.08 ±0.91 / 129.53 ms │     no change │
│ QQuery 19 │        156.30 / 157.23 ±0.62 / 158.15 ms │        156.36 / 157.54 ±1.53 / 160.49 ms │     no change │
│ QQuery 20 │           13.75 / 14.35 ±0.63 / 15.42 ms │           14.22 / 14.95 ±0.58 / 15.99 ms │     no change │
│ QQuery 21 │           19.45 / 20.22 ±0.63 / 21.34 ms │           19.94 / 20.88 ±0.59 / 21.59 ms │     no change │
│ QQuery 22 │        484.69 / 489.03 ±5.72 / 500.33 ms │        491.11 / 496.40 ±5.24 / 505.76 ms │     no change │
│ QQuery 23 │        881.82 / 889.29 ±5.67 / 896.99 ms │        872.94 / 881.05 ±7.07 / 893.46 ms │     no change │
│ QQuery 24 │        382.92 / 384.97 ±1.08 / 385.86 ms │        380.63 / 384.80 ±2.88 / 388.29 ms │     no change │
│ QQuery 25 │        338.23 / 340.74 ±1.48 / 342.86 ms │        337.81 / 339.57 ±1.13 / 341.03 ms │     no change │
│ QQuery 26 │           80.18 / 81.06 ±0.54 / 81.56 ms │           80.16 / 82.93 ±1.69 / 85.07 ms │     no change │
│ QQuery 27 │              6.82 / 7.04 ±0.19 / 7.26 ms │                                     FAIL │  incomparable │
│ QQuery 28 │        148.74 / 149.50 ±0.62 / 150.38 ms │        148.17 / 149.79 ±1.37 / 151.76 ms │     no change │
│ QQuery 29 │        281.92 / 283.73 ±1.87 / 287.26 ms │        279.18 / 280.66 ±1.61 / 283.42 ms │     no change │
│ QQuery 30 │           42.78 / 45.39 ±1.63 / 47.58 ms │           42.52 / 44.81 ±1.53 / 46.99 ms │     no change │
│ QQuery 31 │        170.52 / 172.06 ±1.39 / 174.61 ms │        170.34 / 172.58 ±1.66 / 174.86 ms │     no change │
│ QQuery 32 │           57.47 / 58.89 ±1.10 / 60.19 ms │           57.04 / 58.04 ±0.59 / 58.88 ms │     no change │
│ QQuery 33 │        141.97 / 142.20 ±0.20 / 142.44 ms │        140.06 / 142.02 ±1.00 / 142.80 ms │     no change │
│ QQuery 34 │              6.90 / 7.16 ±0.22 / 7.53 ms │              7.04 / 7.22 ±0.22 / 7.65 ms │     no change │
│ QQuery 35 │        107.58 / 108.90 ±0.87 / 109.96 ms │        106.96 / 110.11 ±1.73 / 112.26 ms │     no change │
│ QQuery 36 │              6.72 / 6.90 ±0.16 / 7.15 ms │              6.62 / 6.77 ±0.12 / 6.89 ms │     no change │
│ QQuery 37 │             8.47 / 9.19 ±0.84 / 10.67 ms │              8.48 / 8.74 ±0.34 / 9.40 ms │     no change │
│ QQuery 38 │           84.52 / 88.50 ±4.15 / 96.29 ms │           83.27 / 89.06 ±3.97 / 95.21 ms │     no change │
│ QQuery 39 │        125.23 / 128.35 ±3.06 / 133.11 ms │        133.31 / 135.72 ±1.95 / 138.29 ms │  1.06x slower │
│ QQuery 40 │        107.86 / 115.40 ±8.43 / 130.77 ms │        111.24 / 115.59 ±5.10 / 125.34 ms │     no change │
│ QQuery 41 │           14.32 / 15.55 ±1.40 / 17.96 ms │           15.08 / 15.75 ±0.61 / 16.81 ms │     no change │
│ QQuery 42 │        106.37 / 108.39 ±1.20 / 109.79 ms │        108.71 / 109.99 ±0.95 / 111.11 ms │     no change │
│ QQuery 43 │              6.08 / 6.38 ±0.31 / 6.95 ms │              6.11 / 6.28 ±0.24 / 6.76 ms │     no change │
│ QQuery 44 │           11.72 / 12.52 ±0.87 / 13.85 ms │           11.62 / 11.89 ±0.20 / 12.13 ms │ +1.05x faster │
│ QQuery 45 │           50.75 / 51.87 ±0.95 / 53.12 ms │           50.87 / 51.88 ±0.92 / 53.35 ms │     no change │
│ QQuery 46 │              8.47 / 9.08 ±0.42 / 9.78 ms │              8.32 / 8.69 ±0.24 / 8.92 ms │     no change │
│ QQuery 47 │       718.72 / 732.79 ±11.84 / 747.43 ms │        695.90 / 705.79 ±7.56 / 717.72 ms │     no change │
│ QQuery 48 │        286.96 / 291.08 ±3.18 / 296.53 ms │        285.79 / 290.23 ±5.06 / 299.96 ms │     no change │
│ QQuery 49 │        251.43 / 253.25 ±1.40 / 255.26 ms │        248.12 / 251.89 ±2.08 / 254.17 ms │     no change │
│ QQuery 50 │        221.49 / 227.19 ±4.64 / 234.23 ms │        219.76 / 223.22 ±2.02 / 226.02 ms │     no change │
│ QQuery 51 │        181.98 / 183.52 ±1.02 / 184.87 ms │        179.95 / 182.02 ±1.41 / 184.06 ms │     no change │
│ QQuery 52 │        107.94 / 108.56 ±0.76 / 110.03 ms │        106.45 / 108.02 ±1.55 / 110.97 ms │     no change │
│ QQuery 53 │        102.80 / 104.17 ±1.09 / 106.15 ms │        102.63 / 103.87 ±1.03 / 105.10 ms │     no change │
│ QQuery 54 │        147.92 / 148.39 ±0.36 / 148.90 ms │        145.74 / 147.25 ±0.89 / 148.24 ms │     no change │
│ QQuery 55 │        106.79 / 108.30 ±1.17 / 109.75 ms │        106.16 / 107.22 ±1.46 / 110.09 ms │     no change │
│ QQuery 56 │        141.92 / 142.93 ±0.89 / 144.50 ms │        139.74 / 141.36 ±1.52 / 144.11 ms │     no change │
│ QQuery 57 │        177.16 / 178.06 ±1.27 / 180.58 ms │        172.58 / 175.58 ±2.26 / 178.31 ms │     no change │
│ QQuery 58 │        298.70 / 303.95 ±5.01 / 310.76 ms │        289.73 / 296.19 ±6.74 / 308.58 ms │     no change │
│ QQuery 59 │        200.73 / 206.09 ±3.24 / 210.53 ms │        199.54 / 202.49 ±2.32 / 205.43 ms │     no change │
│ QQuery 60 │        145.91 / 147.60 ±1.11 / 149.12 ms │        142.04 / 144.84 ±2.36 / 148.08 ms │     no change │
│ QQuery 61 │           13.40 / 13.68 ±0.16 / 13.87 ms │           13.22 / 13.53 ±0.23 / 13.86 ms │     no change │
│ QQuery 62 │       906.23 / 942.61 ±24.51 / 979.85 ms │       898.48 / 916.91 ±22.01 / 954.24 ms │     no change │
│ QQuery 63 │        103.37 / 106.94 ±2.86 / 110.24 ms │        102.79 / 104.82 ±1.67 / 107.40 ms │     no change │
│ QQuery 64 │       696.79 / 712.76 ±19.05 / 749.47 ms │        678.63 / 685.81 ±5.23 / 693.77 ms │     no change │
│ QQuery 65 │        257.16 / 262.73 ±3.50 / 267.52 ms │        250.23 / 252.33 ±2.17 / 256.49 ms │     no change │
│ QQuery 66 │        247.28 / 259.19 ±9.17 / 272.84 ms │       247.58 / 258.54 ±11.52 / 280.89 ms │     no change │
│ QQuery 67 │        325.82 / 335.82 ±5.53 / 340.66 ms │        308.82 / 316.07 ±4.28 / 320.15 ms │ +1.06x faster │
│ QQuery 68 │            9.39 / 10.03 ±0.53 / 10.85 ms │            8.60 / 10.02 ±0.87 / 11.05 ms │     no change │
│ QQuery 69 │        104.79 / 106.65 ±1.32 / 108.43 ms │        101.49 / 103.03 ±2.05 / 107.05 ms │     no change │
│ QQuery 70 │       338.83 / 349.79 ±10.45 / 366.27 ms │        339.27 / 351.93 ±8.98 / 363.84 ms │     no change │
│ QQuery 71 │        136.98 / 137.97 ±0.79 / 139.00 ms │        133.94 / 136.81 ±2.20 / 139.24 ms │     no change │
│ QQuery 72 │        633.19 / 640.55 ±5.91 / 646.71 ms │        616.14 / 628.78 ±7.81 / 638.54 ms │     no change │
│ QQuery 73 │              7.43 / 8.80 ±1.11 / 9.99 ms │              7.12 / 7.93 ±0.47 / 8.57 ms │ +1.11x faster │
│ QQuery 74 │        621.01 / 629.25 ±7.28 / 638.11 ms │       608.65 / 623.37 ±11.62 / 639.36 ms │     no change │
│ QQuery 75 │        276.98 / 279.08 ±1.33 / 281.13 ms │        276.55 / 278.84 ±1.57 / 280.65 ms │     no change │
│ QQuery 76 │        131.09 / 133.85 ±2.25 / 137.82 ms │        130.43 / 132.92 ±1.65 / 135.32 ms │     no change │
│ QQuery 77 │        187.27 / 189.42 ±1.67 / 191.55 ms │        186.28 / 188.65 ±1.49 / 190.08 ms │     no change │
│ QQuery 78 │        347.12 / 351.97 ±3.40 / 356.33 ms │        340.75 / 344.53 ±2.66 / 347.39 ms │     no change │
│ QQuery 79 │        236.87 / 239.76 ±2.25 / 243.60 ms │        232.87 / 238.18 ±2.97 / 241.50 ms │     no change │
│ QQuery 80 │        324.38 / 327.52 ±2.03 / 329.78 ms │        318.22 / 322.29 ±3.09 / 326.89 ms │     no change │
│ QQuery 81 │           27.09 / 28.38 ±1.76 / 31.86 ms │           25.92 / 27.06 ±1.42 / 29.85 ms │     no change │
│ QQuery 82 │        202.39 / 205.39 ±2.55 / 210.10 ms │        196.66 / 199.74 ±2.88 / 205.02 ms │     no change │
│ QQuery 83 │           38.83 / 40.38 ±1.02 / 41.84 ms │           38.32 / 38.98 ±0.45 / 39.70 ms │     no change │
│ QQuery 84 │           47.78 / 48.82 ±0.64 / 49.71 ms │           47.61 / 48.73 ±0.70 / 49.74 ms │     no change │
│ QQuery 85 │        149.91 / 151.45 ±1.71 / 154.60 ms │        146.73 / 147.18 ±0.46 / 147.96 ms │     no change │
│ QQuery 86 │           40.14 / 41.01 ±0.90 / 42.69 ms │           39.67 / 40.06 ±0.52 / 41.07 ms │     no change │
│ QQuery 87 │           87.43 / 91.65 ±2.77 / 95.36 ms │           84.36 / 87.31 ±3.73 / 94.62 ms │     no change │
│ QQuery 88 │        103.49 / 104.09 ±0.79 / 105.58 ms │        100.72 / 101.91 ±0.93 / 103.48 ms │     no change │
│ QQuery 89 │        120.48 / 121.91 ±1.17 / 123.79 ms │        116.75 / 118.62 ±1.60 / 121.52 ms │     no change │
│ QQuery 90 │           23.32 / 23.90 ±0.49 / 24.69 ms │           24.19 / 24.41 ±0.21 / 24.80 ms │     no change │
│ QQuery 91 │           62.32 / 64.64 ±1.44 / 66.09 ms │           63.40 / 64.39 ±1.07 / 66.39 ms │     no change │
│ QQuery 92 │           57.77 / 59.16 ±0.78 / 59.85 ms │           56.80 / 58.17 ±1.08 / 60.07 ms │     no change │
│ QQuery 93 │        184.40 / 189.59 ±2.79 / 192.03 ms │        185.98 / 188.33 ±1.32 / 189.74 ms │     no change │
│ QQuery 94 │           60.97 / 61.62 ±0.42 / 62.09 ms │           61.38 / 62.21 ±0.80 / 63.18 ms │     no change │
│ QQuery 95 │        128.96 / 130.22 ±1.22 / 131.76 ms │        128.50 / 129.90 ±1.60 / 132.87 ms │     no change │
│ QQuery 96 │           72.07 / 75.54 ±1.77 / 76.84 ms │           74.83 / 75.92 ±0.98 / 77.76 ms │     no change │
│ QQuery 97 │        126.74 / 128.22 ±1.11 / 129.47 ms │        124.25 / 126.24 ±1.63 / 129.06 ms │     no change │
│ QQuery 98 │        153.21 / 155.76 ±1.57 / 157.86 ms │        153.37 / 155.85 ±1.65 / 158.08 ms │     no change │
│ QQuery 99 │ 10865.46 / 10913.88 ±36.67 / 10965.07 ms │ 10847.39 / 10880.62 ±31.25 / 10931.74 ms │     no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 31824.20ms │
│ Total Time (decompose-avg-optimization)   │ 31676.12ms │
│ Average Time (HEAD)                       │   324.74ms │
│ Average Time (decompose-avg-optimization) │   323.23ms │
│ Queries Faster                            │          4 │
│ Queries Slower                            │          2 │
│ Queries with No Change                    │         92 │
│ Queries with Failure                      │          1 │
└───────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 159.5s
Peak memory 5.3 GiB
Avg memory 4.4 GiB
CPU user 264.0s
CPU sys 17.1s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 158.7s
Peak memory 5.5 GiB
Avg memory 4.5 GiB
CPU user 262.9s
CPU sys 16.1s
Peak spill 0 B

File an issue against this benchmark runner

New test from upstream that includes AVG — update expected EXPLAIN
output to reflect the AVG decomposition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmark tpch

@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmarks

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4243118579-1219-6ll87 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (b32f34d) to 6db3899 (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-c4243118579-1220-n89xj 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (b32f34d) to 6db3899 (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 running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4243118579-1218-qvln4 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (b32f34d) to 6db3899 (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-c4243113192-1217-jv2gj 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (b32f34d) to 6db3899 (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 decompose-avg-optimization
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃            decompose-avg-optimization ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.19 / 4.45 ±6.41 / 17.27 ms │          1.19 / 4.39 ±6.28 / 16.96 ms │     no change │
│ QQuery 1  │        14.69 / 15.03 ±0.18 / 15.19 ms │        14.27 / 14.62 ±0.23 / 14.93 ms │     no change │
│ QQuery 2  │        43.62 / 44.30 ±0.45 / 44.98 ms │        43.87 / 44.30 ±0.27 / 44.65 ms │     no change │
│ QQuery 3  │        40.94 / 44.87 ±2.55 / 47.87 ms │        43.88 / 45.16 ±0.89 / 46.04 ms │     no change │
│ QQuery 4  │     287.49 / 298.58 ±9.11 / 310.28 ms │     288.10 / 300.17 ±7.62 / 309.72 ms │     no change │
│ QQuery 5  │     335.88 / 344.38 ±5.34 / 349.90 ms │     341.08 / 345.74 ±5.17 / 353.83 ms │     no change │
│ QQuery 6  │           5.14 / 5.73 ±0.72 / 7.13 ms │           5.47 / 5.96 ±0.41 / 6.51 ms │     no change │
│ QQuery 7  │        16.97 / 17.76 ±0.75 / 18.87 ms │        16.86 / 18.40 ±1.66 / 20.90 ms │     no change │
│ QQuery 8  │    412.71 / 426.96 ±14.41 / 453.22 ms │    419.53 / 431.17 ±12.54 / 455.50 ms │     no change │
│ QQuery 9  │     636.42 / 644.76 ±4.79 / 651.07 ms │     651.37 / 664.42 ±6.81 / 669.77 ms │     no change │
│ QQuery 10 │       91.58 / 94.32 ±3.28 / 100.54 ms │        93.37 / 96.34 ±2.44 / 99.62 ms │     no change │
│ QQuery 11 │     103.25 / 104.17 ±0.89 / 105.81 ms │     104.89 / 106.03 ±1.12 / 108.08 ms │     no change │
│ QQuery 12 │     334.60 / 339.69 ±2.94 / 343.07 ms │    339.90 / 349.95 ±10.58 / 369.61 ms │     no change │
│ QQuery 13 │    460.24 / 478.00 ±13.31 / 498.83 ms │    459.08 / 473.24 ±10.10 / 489.74 ms │     no change │
│ QQuery 14 │     341.99 / 346.96 ±2.86 / 350.37 ms │     346.98 / 356.92 ±5.82 / 363.65 ms │     no change │
│ QQuery 15 │    344.08 / 369.80 ±23.01 / 410.73 ms │    344.74 / 362.36 ±18.32 / 392.85 ms │     no change │
│ QQuery 16 │     707.60 / 714.17 ±5.32 / 721.68 ms │    709.39 / 723.42 ±11.53 / 737.81 ms │     no change │
│ QQuery 17 │     703.33 / 709.91 ±5.33 / 715.73 ms │     697.71 / 702.57 ±2.97 / 706.32 ms │     no change │
│ QQuery 18 │ 1384.19 / 1430.64 ±32.89 / 1472.77 ms │ 1351.50 / 1367.65 ±17.91 / 1399.03 ms │     no change │
│ QQuery 19 │        35.09 / 38.94 ±5.06 / 48.90 ms │        35.31 / 36.90 ±2.17 / 41.06 ms │ +1.06x faster │
│ QQuery 20 │    728.60 / 744.10 ±16.44 / 768.65 ms │     715.41 / 722.45 ±7.40 / 736.50 ms │     no change │
│ QQuery 21 │     768.19 / 774.69 ±7.60 / 788.37 ms │     763.82 / 767.40 ±2.20 / 770.40 ms │     no change │
│ QQuery 22 │  1128.95 / 1137.37 ±6.35 / 1147.78 ms │  1128.39 / 1133.40 ±3.66 / 1139.49 ms │     no change │
│ QQuery 23 │ 3080.67 / 3108.47 ±22.34 / 3142.34 ms │ 3053.24 / 3074.64 ±12.63 / 3086.90 ms │     no change │
│ QQuery 24 │     101.52 / 104.55 ±3.03 / 110.15 ms │      99.46 / 102.92 ±3.34 / 108.37 ms │     no change │
│ QQuery 25 │     138.69 / 140.20 ±1.17 / 141.93 ms │     139.28 / 143.57 ±2.79 / 146.72 ms │     no change │
│ QQuery 26 │      99.12 / 101.84 ±1.62 / 103.42 ms │      97.68 / 102.73 ±2.62 / 105.09 ms │     no change │
│ QQuery 27 │     852.85 / 856.17 ±3.05 / 860.45 ms │     864.99 / 871.48 ±6.10 / 878.97 ms │     no change │
│ QQuery 28 │  3285.09 / 3298.02 ±9.76 / 3310.73 ms │  3283.03 / 3290.29 ±5.48 / 3298.53 ms │     no change │
│ QQuery 29 │        50.07 / 54.91 ±7.23 / 69.25 ms │        49.69 / 52.26 ±2.40 / 55.11 ms │     no change │
│ QQuery 30 │     358.82 / 366.02 ±4.85 / 373.01 ms │     359.60 / 366.90 ±8.53 / 382.99 ms │     no change │
│ QQuery 31 │     374.24 / 382.22 ±6.06 / 391.16 ms │    372.28 / 386.98 ±14.16 / 412.69 ms │     no change │
│ QQuery 32 │ 1216.25 / 1257.72 ±46.37 / 1341.47 ms │ 1042.38 / 1056.91 ±11.70 / 1075.52 ms │ +1.19x faster │
│ QQuery 33 │ 1526.50 / 1560.80 ±36.63 / 1618.27 ms │ 1454.66 / 1473.87 ±21.45 / 1514.19 ms │ +1.06x faster │
│ QQuery 34 │ 1471.57 / 1547.79 ±62.78 / 1630.56 ms │ 1440.36 / 1463.32 ±17.43 / 1478.26 ms │ +1.06x faster │
│ QQuery 35 │     378.55 / 386.69 ±4.74 / 392.73 ms │     378.81 / 383.02 ±3.16 / 387.94 ms │     no change │
│ QQuery 36 │     118.91 / 124.06 ±3.88 / 129.82 ms │     115.12 / 119.60 ±3.14 / 123.33 ms │     no change │
│ QQuery 37 │        50.26 / 51.36 ±0.92 / 52.56 ms │        47.60 / 49.53 ±1.55 / 51.28 ms │     no change │
│ QQuery 38 │        76.06 / 78.33 ±1.89 / 81.27 ms │        74.67 / 76.62 ±1.32 / 78.79 ms │     no change │
│ QQuery 39 │     217.30 / 225.73 ±7.91 / 239.94 ms │     204.33 / 219.70 ±8.55 / 227.26 ms │     no change │
│ QQuery 40 │        24.26 / 26.57 ±2.75 / 31.91 ms │        23.90 / 26.23 ±2.06 / 28.83 ms │     no change │
│ QQuery 41 │        20.19 / 21.60 ±0.91 / 22.69 ms │        20.28 / 21.21 ±0.58 / 21.84 ms │     no change │
│ QQuery 42 │        20.01 / 20.93 ±1.25 / 23.40 ms │        19.49 / 20.34 ±0.52 / 21.01 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 22843.58ms │
│ Total Time (decompose-avg-optimization)   │ 22375.08ms │
│ Average Time (HEAD)                       │   531.25ms │
│ Average Time (decompose-avg-optimization) │   520.35ms │
│ Queries Faster                            │          4 │
│ Queries Slower                            │          0 │
│ Queries with No Change                    │         39 │
│ Queries with Failure                      │          0 │
└───────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 115.2s
Peak memory 34.3 GiB
Avg memory 26.8 GiB
CPU user 1068.1s
CPU sys 101.5s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 113.0s
Peak memory 42.2 GiB
Avg memory 33.3 GiB
CPU user 1070.1s
CPU sys 83.8s
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 decompose-avg-optimization
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃               decompose-avg-optimization ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │              7.25 / 7.75 ±0.68 / 9.09 ms │              6.70 / 7.16 ±0.78 / 8.72 ms │ +1.08x faster │
│ QQuery 2  │        148.65 / 148.95 ±0.18 / 149.14 ms │        145.93 / 146.27 ±0.44 / 147.12 ms │     no change │
│ QQuery 3  │        114.73 / 115.64 ±0.86 / 117.09 ms │        114.84 / 115.77 ±0.79 / 117.10 ms │     no change │
│ QQuery 4  │    1358.55 / 1389.05 ±16.16 / 1402.76 ms │     1392.67 / 1400.37 ±7.70 / 1411.83 ms │     no change │
│ QQuery 5  │        171.28 / 174.04 ±1.82 / 175.94 ms │        172.68 / 175.63 ±2.14 / 179.21 ms │     no change │
│ QQuery 6  │       844.13 / 881.85 ±25.06 / 913.52 ms │       836.78 / 862.50 ±22.56 / 901.41 ms │     no change │
│ QQuery 7  │        345.68 / 351.14 ±3.36 / 356.23 ms │        346.50 / 349.49 ±4.82 / 359.09 ms │     no change │
│ QQuery 8  │        117.84 / 118.32 ±0.45 / 119.14 ms │        116.73 / 118.13 ±0.88 / 119.11 ms │     no change │
│ QQuery 9  │       100.85 / 108.34 ±10.64 / 129.37 ms │        102.44 / 107.18 ±2.68 / 110.53 ms │     no change │
│ QQuery 10 │        107.73 / 108.38 ±0.64 / 109.30 ms │        108.52 / 109.45 ±0.70 / 110.57 ms │     no change │
│ QQuery 11 │      970.97 / 993.63 ±15.53 / 1013.68 ms │       960.84 / 977.46 ±10.15 / 992.33 ms │     no change │
│ QQuery 12 │           46.50 / 48.82 ±1.28 / 50.08 ms │           45.63 / 46.49 ±0.49 / 47.16 ms │     no change │
│ QQuery 13 │        407.45 / 410.54 ±2.03 / 412.66 ms │        402.22 / 407.70 ±3.94 / 411.27 ms │     no change │
│ QQuery 14 │     1008.47 / 1021.69 ±7.51 / 1031.54 ms │     1016.98 / 1022.40 ±3.82 / 1027.92 ms │     no change │
│ QQuery 15 │           15.98 / 16.98 ±0.94 / 18.69 ms │           15.65 / 17.76 ±1.32 / 19.81 ms │     no change │
│ QQuery 16 │              7.27 / 7.83 ±0.47 / 8.62 ms │              7.21 / 7.52 ±0.29 / 7.87 ms │     no change │
│ QQuery 17 │        230.20 / 232.79 ±1.93 / 234.82 ms │        231.88 / 234.33 ±2.20 / 238.41 ms │     no change │
│ QQuery 18 │        128.35 / 129.53 ±1.10 / 131.38 ms │        128.16 / 129.73 ±1.25 / 131.49 ms │     no change │
│ QQuery 19 │        156.88 / 159.17 ±1.52 / 160.91 ms │        159.56 / 161.04 ±1.56 / 163.78 ms │     no change │
│ QQuery 20 │           14.16 / 14.77 ±0.50 / 15.55 ms │           14.21 / 14.95 ±0.44 / 15.46 ms │     no change │
│ QQuery 21 │           19.91 / 20.23 ±0.29 / 20.73 ms │           19.66 / 20.13 ±0.48 / 20.72 ms │     no change │
│ QQuery 22 │        499.07 / 502.17 ±2.68 / 506.40 ms │        498.06 / 500.37 ±1.42 / 502.43 ms │     no change │
│ QQuery 23 │        877.62 / 892.80 ±9.78 / 908.23 ms │        899.38 / 910.10 ±9.19 / 922.06 ms │     no change │
│ QQuery 24 │        386.03 / 392.26 ±4.07 / 398.76 ms │        392.40 / 395.38 ±3.37 / 401.91 ms │     no change │
│ QQuery 25 │        341.71 / 347.71 ±3.38 / 350.59 ms │        344.92 / 348.66 ±2.44 / 352.06 ms │     no change │
│ QQuery 26 │           82.62 / 84.08 ±1.43 / 86.79 ms │           81.59 / 82.95 ±1.13 / 84.39 ms │     no change │
│ QQuery 27 │              6.95 / 7.17 ±0.16 / 7.39 ms │              7.14 / 7.51 ±0.25 / 7.87 ms │     no change │
│ QQuery 28 │        149.51 / 150.99 ±0.93 / 152.16 ms │        149.79 / 152.14 ±1.38 / 153.24 ms │     no change │
│ QQuery 29 │        281.79 / 284.42 ±1.67 / 286.69 ms │        284.33 / 286.89 ±2.02 / 290.28 ms │     no change │
│ QQuery 30 │           42.72 / 45.81 ±1.98 / 47.70 ms │           42.78 / 45.23 ±1.66 / 47.75 ms │     no change │
│ QQuery 31 │        172.31 / 174.87 ±1.61 / 176.68 ms │        170.32 / 173.65 ±2.48 / 176.70 ms │     no change │
│ QQuery 32 │           57.13 / 58.84 ±1.11 / 60.23 ms │           57.23 / 57.77 ±0.56 / 58.81 ms │     no change │
│ QQuery 33 │        141.31 / 144.03 ±1.44 / 145.53 ms │        142.10 / 143.77 ±1.03 / 144.66 ms │     no change │
│ QQuery 34 │              6.99 / 7.50 ±0.36 / 7.97 ms │              7.00 / 7.36 ±0.30 / 7.80 ms │     no change │
│ QQuery 35 │        108.82 / 111.10 ±1.43 / 113.28 ms │        110.72 / 111.56 ±0.87 / 113.14 ms │     no change │
│ QQuery 36 │              6.62 / 6.82 ±0.20 / 7.17 ms │              6.73 / 6.97 ±0.15 / 7.19 ms │     no change │
│ QQuery 37 │              8.22 / 8.83 ±0.51 / 9.48 ms │             8.75 / 9.51 ±1.20 / 11.89 ms │  1.08x slower │
│ QQuery 38 │           85.18 / 88.24 ±2.71 / 93.30 ms │           84.47 / 88.56 ±4.23 / 96.17 ms │     no change │
│ QQuery 39 │        129.39 / 133.04 ±2.14 / 134.78 ms │        139.42 / 140.67 ±1.07 / 142.61 ms │  1.06x slower │
│ QQuery 40 │        112.16 / 117.36 ±5.86 / 128.78 ms │        107.50 / 115.75 ±7.32 / 128.72 ms │     no change │
│ QQuery 41 │           15.52 / 16.27 ±0.68 / 17.28 ms │           14.62 / 15.52 ±1.00 / 17.44 ms │     no change │
│ QQuery 42 │        109.39 / 110.34 ±0.74 / 111.19 ms │        110.35 / 111.04 ±0.56 / 111.71 ms │     no change │
│ QQuery 43 │              6.14 / 6.31 ±0.14 / 6.58 ms │              6.04 / 6.52 ±0.45 / 7.31 ms │     no change │
│ QQuery 44 │           12.04 / 12.89 ±0.63 / 13.87 ms │           11.48 / 12.74 ±0.70 / 13.48 ms │     no change │
│ QQuery 45 │           51.67 / 52.54 ±1.05 / 54.57 ms │           51.40 / 52.40 ±1.10 / 54.43 ms │     no change │
│ QQuery 46 │              8.48 / 8.93 ±0.33 / 9.51 ms │              8.47 / 8.90 ±0.43 / 9.63 ms │     no change │
│ QQuery 47 │        736.65 / 741.64 ±2.85 / 744.27 ms │        732.35 / 738.77 ±3.56 / 743.17 ms │     no change │
│ QQuery 48 │        294.07 / 297.70 ±2.36 / 300.36 ms │        286.01 / 292.83 ±3.99 / 296.90 ms │     no change │
│ QQuery 49 │        252.39 / 255.69 ±1.88 / 258.15 ms │        252.91 / 255.76 ±2.30 / 258.89 ms │     no change │
│ QQuery 50 │        233.11 / 236.11 ±3.16 / 240.42 ms │        224.95 / 227.59 ±1.88 / 230.60 ms │     no change │
│ QQuery 51 │        183.57 / 185.85 ±2.37 / 190.19 ms │        184.27 / 186.18 ±1.19 / 187.63 ms │     no change │
│ QQuery 52 │        107.45 / 110.32 ±2.09 / 113.22 ms │        109.21 / 110.33 ±1.28 / 112.76 ms │     no change │
│ QQuery 53 │        103.21 / 104.29 ±0.80 / 105.58 ms │        102.53 / 104.36 ±1.47 / 107.00 ms │     no change │
│ QQuery 54 │        148.71 / 150.63 ±2.33 / 155.05 ms │        148.72 / 149.56 ±1.45 / 152.45 ms │     no change │
│ QQuery 55 │        106.85 / 108.86 ±1.59 / 111.57 ms │        107.25 / 110.17 ±2.00 / 112.28 ms │     no change │
│ QQuery 56 │        142.88 / 143.83 ±0.86 / 145.33 ms │        141.57 / 144.55 ±2.11 / 146.94 ms │     no change │
│ QQuery 57 │        177.24 / 178.15 ±1.06 / 180.13 ms │        173.48 / 176.69 ±1.83 / 178.34 ms │     no change │
│ QQuery 58 │        292.68 / 296.50 ±3.34 / 301.83 ms │        292.40 / 296.58 ±3.82 / 303.09 ms │     no change │
│ QQuery 59 │        205.32 / 205.58 ±0.20 / 205.92 ms │        201.89 / 203.85 ±1.42 / 205.95 ms │     no change │
│ QQuery 60 │        144.82 / 146.46 ±1.17 / 147.90 ms │        146.64 / 147.70 ±1.34 / 150.26 ms │     no change │
│ QQuery 61 │           13.36 / 13.69 ±0.26 / 14.00 ms │           13.38 / 13.68 ±0.17 / 13.90 ms │     no change │
│ QQuery 62 │      906.70 / 947.57 ±42.30 / 1027.40 ms │      928.81 / 957.32 ±33.34 / 1021.88 ms │     no change │
│ QQuery 63 │        104.47 / 106.27 ±0.95 / 107.30 ms │        104.18 / 107.36 ±3.78 / 114.63 ms │     no change │
│ QQuery 64 │        690.61 / 694.77 ±3.67 / 700.18 ms │        690.53 / 695.54 ±6.37 / 706.02 ms │     no change │
│ QQuery 65 │        254.11 / 259.31 ±2.79 / 261.86 ms │        256.74 / 259.90 ±2.42 / 262.63 ms │     no change │
│ QQuery 66 │       227.19 / 252.86 ±17.78 / 281.56 ms │        248.79 / 260.31 ±9.85 / 275.10 ms │     no change │
│ QQuery 67 │        312.64 / 317.24 ±5.53 / 327.60 ms │        311.52 / 320.03 ±6.25 / 328.74 ms │     no change │
│ QQuery 68 │           10.86 / 11.82 ±0.88 / 13.04 ms │            9.02 / 10.12 ±0.97 / 11.85 ms │ +1.17x faster │
│ QQuery 69 │        102.94 / 105.45 ±3.08 / 110.99 ms │        104.55 / 106.24 ±1.98 / 109.87 ms │     no change │
│ QQuery 70 │       342.16 / 357.37 ±14.71 / 382.19 ms │       333.39 / 352.75 ±15.79 / 375.64 ms │     no change │
│ QQuery 71 │        136.40 / 139.73 ±2.38 / 143.54 ms │        135.65 / 138.02 ±2.01 / 141.74 ms │     no change │
│ QQuery 72 │        619.05 / 635.36 ±9.11 / 644.92 ms │        620.66 / 625.27 ±3.96 / 630.25 ms │     no change │
│ QQuery 73 │             6.61 / 8.63 ±1.30 / 10.50 ms │              6.77 / 7.89 ±1.06 / 9.47 ms │ +1.09x faster │
│ QQuery 74 │        593.63 / 608.97 ±9.09 / 619.87 ms │        614.21 / 622.58 ±8.25 / 638.00 ms │     no change │
│ QQuery 75 │        278.15 / 281.74 ±2.48 / 284.18 ms │        280.11 / 281.68 ±1.00 / 283.15 ms │     no change │
│ QQuery 76 │        134.31 / 136.44 ±2.10 / 140.29 ms │        133.80 / 135.06 ±1.27 / 137.30 ms │     no change │
│ QQuery 77 │        192.26 / 194.02 ±1.23 / 195.87 ms │        189.98 / 192.75 ±1.61 / 194.76 ms │     no change │
│ QQuery 78 │        346.74 / 350.58 ±2.32 / 353.25 ms │        346.38 / 348.57 ±1.36 / 350.68 ms │     no change │
│ QQuery 79 │        234.18 / 240.85 ±3.46 / 243.92 ms │        238.96 / 244.30 ±4.12 / 251.69 ms │     no change │
│ QQuery 80 │        324.46 / 326.94 ±2.56 / 330.46 ms │        322.64 / 326.57 ±2.60 / 329.41 ms │     no change │
│ QQuery 81 │           26.35 / 27.36 ±0.81 / 28.51 ms │           27.58 / 28.60 ±0.99 / 30.05 ms │     no change │
│ QQuery 82 │        197.11 / 201.06 ±2.35 / 203.16 ms │        200.88 / 203.75 ±2.67 / 207.70 ms │     no change │
│ QQuery 83 │           39.42 / 41.25 ±1.51 / 43.80 ms │           39.84 / 40.83 ±0.76 / 41.58 ms │     no change │
│ QQuery 84 │           48.59 / 49.93 ±1.42 / 52.41 ms │           48.52 / 50.13 ±1.87 / 53.52 ms │     no change │
│ QQuery 85 │        150.12 / 151.77 ±1.27 / 153.76 ms │        149.76 / 153.06 ±2.53 / 156.59 ms │     no change │
│ QQuery 86 │           39.49 / 41.18 ±1.50 / 43.03 ms │           39.11 / 40.01 ±0.75 / 41.24 ms │     no change │
│ QQuery 87 │           85.36 / 89.31 ±3.31 / 94.61 ms │           89.12 / 93.32 ±3.14 / 96.38 ms │     no change │
│ QQuery 88 │        100.77 / 102.07 ±1.21 / 103.68 ms │        102.13 / 103.00 ±0.85 / 104.37 ms │     no change │
│ QQuery 89 │        119.95 / 122.36 ±1.45 / 123.83 ms │        119.96 / 121.22 ±0.88 / 122.73 ms │     no change │
│ QQuery 90 │           24.25 / 24.50 ±0.24 / 24.95 ms │           24.22 / 25.49 ±0.86 / 26.65 ms │     no change │
│ QQuery 91 │           63.05 / 65.16 ±1.47 / 66.94 ms │           64.43 / 65.12 ±0.76 / 66.52 ms │     no change │
│ QQuery 92 │           57.59 / 58.36 ±0.50 / 59.18 ms │           58.87 / 60.38 ±0.85 / 61.13 ms │     no change │
│ QQuery 93 │        187.73 / 190.58 ±1.70 / 192.78 ms │        188.99 / 190.00 ±0.92 / 191.72 ms │     no change │
│ QQuery 94 │           61.71 / 63.28 ±0.98 / 64.39 ms │           61.61 / 63.11 ±0.78 / 63.78 ms │     no change │
│ QQuery 95 │        129.91 / 130.50 ±0.71 / 131.82 ms │        130.82 / 131.76 ±0.76 / 132.69 ms │     no change │
│ QQuery 96 │           72.32 / 74.35 ±1.92 / 77.90 ms │           71.74 / 74.69 ±1.52 / 75.99 ms │     no change │
│ QQuery 97 │        128.84 / 130.36 ±1.00 / 131.77 ms │        129.18 / 131.31 ±1.51 / 132.99 ms │     no change │
│ QQuery 98 │        153.74 / 157.50 ±2.22 / 160.03 ms │        154.59 / 157.92 ±2.43 / 160.22 ms │     no change │
│ QQuery 99 │ 10816.82 / 10868.00 ±33.25 / 10918.75 ms │ 10777.41 / 10806.93 ±30.94 / 10864.66 ms │     no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 31964.87ms │
│ Total Time (decompose-avg-optimization)   │ 31914.92ms │
│ Average Time (HEAD)                       │   322.88ms │
│ Average Time (decompose-avg-optimization) │   322.37ms │
│ Queries Faster                            │          3 │
│ Queries Slower                            │          2 │
│ Queries with No Change                    │         94 │
│ Queries with Failure                      │          0 │
└───────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 160.2s
Peak memory 5.7 GiB
Avg memory 4.5 GiB
CPU user 264.2s
CPU sys 17.9s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 159.9s
Peak memory 5.7 GiB
Avg memory 4.7 GiB
CPU user 264.6s
CPU sys 17.7s
Peak spill 0 B

File an issue against this benchmark runner

@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmark tpch tpch10

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4243299050-1221-rpdm9 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (b32f34d) to 6db3899 (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 running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4243299050-1222-mpgb5 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (b32f34d) to 6db3899 (merge-base) diff using: tpch10
Results will be posted here when complete


File an issue against this benchmark runner

@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmark clickbench_partitioned

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4243321982-1223-fkdnm 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 decompose-avg-optimization (b32f34d) to 6db3899 (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 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 decompose-avg-optimization
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                               HEAD ┃         decompose-avg-optimization ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │  367.69 / 369.61 ±1.09 / 370.95 ms │  367.74 / 369.52 ±1.44 / 372.13 ms │ no change │
│ QQuery 2  │  134.33 / 137.64 ±2.27 / 141.31 ms │  135.15 / 137.88 ±1.61 / 139.33 ms │ no change │
│ QQuery 3  │  297.87 / 302.61 ±3.07 / 305.23 ms │  294.63 / 299.03 ±5.07 / 308.39 ms │ no change │
│ QQuery 4  │  156.13 / 157.96 ±1.63 / 160.79 ms │  153.31 / 156.51 ±2.26 / 159.44 ms │ no change │
│ QQuery 5  │  433.54 / 435.92 ±2.35 / 439.36 ms │  427.05 / 431.42 ±3.54 / 435.20 ms │ no change │
│ QQuery 6  │  129.82 / 130.94 ±1.05 / 132.40 ms │  129.13 / 129.52 ±0.45 / 130.29 ms │ no change │
│ QQuery 7  │  549.06 / 560.44 ±5.81 / 564.80 ms │  549.69 / 554.02 ±3.99 / 561.28 ms │ no change │
│ QQuery 8  │  468.13 / 477.74 ±7.90 / 488.76 ms │  472.31 / 476.70 ±5.88 / 488.25 ms │ no change │
│ QQuery 9  │  670.83 / 680.99 ±8.10 / 693.84 ms │  668.50 / 681.76 ±7.38 / 688.80 ms │ no change │
│ QQuery 10 │  325.89 / 334.45 ±5.33 / 341.46 ms │  325.57 / 336.50 ±7.16 / 347.93 ms │ no change │
│ QQuery 11 │  106.05 / 109.53 ±2.26 / 112.19 ms │  107.45 / 110.22 ±2.43 / 114.08 ms │ no change │
│ QQuery 12 │  202.67 / 204.48 ±1.10 / 205.78 ms │  200.94 / 203.76 ±1.64 / 205.24 ms │ no change │
│ QQuery 13 │  307.11 / 317.32 ±6.12 / 323.37 ms │  313.57 / 326.61 ±8.16 / 336.09 ms │ no change │
│ QQuery 14 │  176.76 / 181.68 ±4.02 / 187.68 ms │  179.22 / 180.90 ±1.46 / 183.26 ms │ no change │
│ QQuery 15 │  328.27 / 330.08 ±1.11 / 331.36 ms │  327.64 / 332.91 ±5.19 / 339.85 ms │ no change │
│ QQuery 16 │     84.60 / 87.46 ±1.49 / 88.85 ms │     84.10 / 87.80 ±2.61 / 91.51 ms │ no change │
│ QQuery 17 │  748.73 / 752.37 ±2.84 / 757.07 ms │  749.96 / 755.30 ±4.20 / 760.52 ms │ no change │
│ QQuery 18 │ 850.78 / 860.10 ±10.46 / 879.95 ms │ 842.88 / 864.14 ±12.60 / 876.32 ms │ no change │
│ QQuery 19 │  263.73 / 268.66 ±4.53 / 276.89 ms │  261.94 / 267.47 ±4.24 / 274.70 ms │ no change │
│ QQuery 20 │  317.86 / 323.09 ±2.82 / 325.92 ms │  321.35 / 325.46 ±2.34 / 328.18 ms │ no change │
│ QQuery 21 │ 840.35 / 853.91 ±12.80 / 876.45 ms │  838.30 / 848.70 ±9.75 / 863.77 ms │ no change │
│ QQuery 22 │     79.62 / 82.42 ±2.07 / 84.75 ms │     79.31 / 80.87 ±1.19 / 82.63 ms │ no change │
└───────────┴────────────────────────────────────┴────────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 7959.39ms │
│ Total Time (decompose-avg-optimization)   │ 7956.99ms │
│ Average Time (HEAD)                       │  361.79ms │
│ Average Time (decompose-avg-optimization) │  361.68ms │
│ 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 40.2s
Peak memory 10.1 GiB
Avg memory 7.7 GiB
CPU user 424.3s
CPU sys 24.8s
Peak spill 0 B

tpch10 — branch

Metric Value
Wall time 40.1s
Peak memory 10.1 GiB
Avg memory 7.8 GiB
CPU user 423.6s
CPU sys 25.0s
Peak spill 0 B

File an issue against this benchmark runner

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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 decompose-avg-optimization
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃            decompose-avg-optimization ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.17 / 4.37 ±6.28 / 16.93 ms │          1.19 / 4.36 ±6.25 / 16.87 ms │     no change │
│ QQuery 1  │        14.40 / 15.03 ±0.54 / 15.98 ms │        13.93 / 14.41 ±0.35 / 15.00 ms │     no change │
│ QQuery 2  │        44.03 / 45.19 ±1.55 / 48.22 ms │        43.29 / 43.57 ±0.22 / 43.87 ms │     no change │
│ QQuery 3  │        41.53 / 45.18 ±2.34 / 47.75 ms │        43.50 / 46.19 ±2.03 / 49.05 ms │     no change │
│ QQuery 4  │     283.83 / 290.53 ±5.74 / 298.50 ms │     284.62 / 293.15 ±6.65 / 301.26 ms │     no change │
│ QQuery 5  │     337.65 / 340.54 ±2.55 / 344.17 ms │     333.91 / 339.61 ±3.49 / 343.70 ms │     no change │
│ QQuery 6  │           5.14 / 5.77 ±0.34 / 6.13 ms │           5.41 / 7.27 ±1.51 / 9.88 ms │  1.26x slower │
│ QQuery 7  │        16.83 / 18.05 ±1.11 / 19.99 ms │        16.35 / 16.64 ±0.42 / 17.48 ms │ +1.08x faster │
│ QQuery 8  │     417.42 / 421.67 ±3.17 / 426.78 ms │     405.68 / 413.75 ±7.79 / 428.48 ms │     no change │
│ QQuery 9  │     632.71 / 641.17 ±9.64 / 658.74 ms │     632.08 / 644.17 ±7.89 / 655.69 ms │     no change │
│ QQuery 10 │        91.05 / 93.88 ±2.30 / 97.92 ms │       89.88 / 94.24 ±5.37 / 104.59 ms │     no change │
│ QQuery 11 │     104.09 / 106.10 ±1.41 / 108.30 ms │     101.61 / 103.92 ±1.57 / 105.92 ms │     no change │
│ QQuery 12 │     335.68 / 341.58 ±3.99 / 348.18 ms │     337.63 / 344.89 ±6.49 / 355.70 ms │     no change │
│ QQuery 13 │    450.53 / 466.46 ±11.16 / 485.24 ms │    446.21 / 462.06 ±15.18 / 485.45 ms │     no change │
│ QQuery 14 │     340.32 / 345.10 ±4.88 / 354.27 ms │     339.69 / 343.28 ±3.38 / 347.82 ms │     no change │
│ QQuery 15 │    349.90 / 367.34 ±20.57 / 402.01 ms │    345.53 / 363.51 ±22.76 / 406.11 ms │     no change │
│ QQuery 16 │     704.33 / 710.45 ±7.70 / 725.01 ms │     700.33 / 708.56 ±6.15 / 718.40 ms │     no change │
│ QQuery 17 │     692.33 / 704.82 ±8.53 / 718.49 ms │     696.83 / 702.22 ±3.94 / 707.59 ms │     no change │
│ QQuery 18 │ 1379.18 / 1447.50 ±47.64 / 1498.54 ms │ 1333.33 / 1380.17 ±33.04 / 1428.66 ms │     no change │
│ QQuery 19 │        34.61 / 36.58 ±1.77 / 39.22 ms │        35.28 / 35.94 ±0.56 / 36.81 ms │     no change │
│ QQuery 20 │    716.63 / 732.97 ±17.83 / 758.96 ms │    709.19 / 716.64 ±11.09 / 738.64 ms │     no change │
│ QQuery 21 │     760.92 / 767.62 ±4.70 / 772.84 ms │     754.81 / 758.09 ±2.03 / 760.72 ms │     no change │
│ QQuery 22 │  1123.58 / 1129.03 ±5.77 / 1139.82 ms │  1125.06 / 1129.43 ±2.84 / 1133.48 ms │     no change │
│ QQuery 23 │ 3038.50 / 3059.27 ±11.13 / 3068.56 ms │ 3025.28 / 3043.63 ±12.55 / 3060.68 ms │     no change │
│ QQuery 24 │      98.88 / 101.79 ±1.99 / 104.68 ms │       98.75 / 99.65 ±0.87 / 101.17 ms │     no change │
│ QQuery 25 │     136.73 / 139.28 ±1.91 / 142.14 ms │     137.48 / 140.78 ±2.20 / 144.37 ms │     no change │
│ QQuery 26 │      99.00 / 102.46 ±1.99 / 104.71 ms │      98.74 / 100.95 ±2.23 / 104.76 ms │     no change │
│ QQuery 27 │    843.98 / 852.64 ±12.30 / 876.89 ms │     858.87 / 864.66 ±4.18 / 870.05 ms │     no change │
│ QQuery 28 │ 3237.69 / 3283.22 ±23.46 / 3303.37 ms │ 3263.40 / 3291.69 ±14.32 / 3302.53 ms │     no change │
│ QQuery 29 │        49.73 / 53.76 ±3.88 / 60.38 ms │        49.12 / 52.39 ±2.22 / 54.87 ms │     no change │
│ QQuery 30 │     348.36 / 358.29 ±8.84 / 374.44 ms │     350.41 / 360.53 ±6.34 / 368.47 ms │     no change │
│ QQuery 31 │    349.77 / 366.87 ±13.44 / 390.51 ms │     360.34 / 371.47 ±6.84 / 381.20 ms │     no change │
│ QQuery 32 │ 1208.42 / 1267.75 ±34.27 / 1299.26 ms │ 1023.18 / 1040.69 ±14.08 / 1060.63 ms │ +1.22x faster │
│ QQuery 33 │ 1510.65 / 1556.16 ±37.13 / 1622.93 ms │  1418.63 / 1434.67 ±8.45 / 1443.48 ms │ +1.08x faster │
│ QQuery 34 │ 1454.62 / 1482.29 ±32.05 / 1530.89 ms │ 1462.46 / 1499.95 ±30.84 / 1550.00 ms │     no change │
│ QQuery 35 │    373.18 / 388.00 ±12.40 / 410.63 ms │     375.13 / 384.47 ±6.59 / 394.08 ms │     no change │
│ QQuery 36 │     119.09 / 121.61 ±2.24 / 124.34 ms │     110.57 / 118.94 ±4.72 / 124.02 ms │     no change │
│ QQuery 37 │        46.86 / 48.46 ±1.35 / 50.18 ms │        47.19 / 49.17 ±1.77 / 51.85 ms │     no change │
│ QQuery 38 │        73.62 / 75.87 ±2.17 / 79.45 ms │        74.24 / 76.06 ±1.37 / 77.37 ms │     no change │
│ QQuery 39 │     203.63 / 214.33 ±7.32 / 222.44 ms │     206.36 / 211.76 ±7.42 / 226.49 ms │     no change │
│ QQuery 40 │        24.51 / 25.76 ±0.74 / 26.54 ms │        23.18 / 24.53 ±1.21 / 26.29 ms │     no change │
│ QQuery 41 │        19.29 / 20.17 ±0.98 / 21.97 ms │        18.85 / 20.11 ±0.95 / 21.42 ms │     no change │
│ QQuery 42 │        19.36 / 20.36 ±1.30 / 22.90 ms │        18.80 / 19.65 ±0.72 / 20.73 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                         ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                         │ 22615.24ms │
│ Total Time (decompose-avg-optimization)   │ 22171.84ms │
│ Average Time (HEAD)                       │   525.94ms │
│ Average Time (decompose-avg-optimization) │   515.62ms │
│ Queries Faster                            │          3 │
│ Queries Slower                            │          1 │
│ Queries with No Change                    │         39 │
│ Queries with Failure                      │          0 │
└───────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 114.0s
Peak memory 37.9 GiB
Avg memory 28.3 GiB
CPU user 1064.9s
CPU sys 94.4s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 111.9s
Peak memory 38.9 GiB
Avg memory 32.2 GiB
CPU user 1062.6s
CPU sys 81.0s
Peak spill 0 B

File an issue against this benchmark runner

Dandandan and others added 2 commits April 14, 2026 16:26
Instead of SUM(CAST(x AS Float64)), cast to SUM's native types:
Int8/Int16/Int32 → CAST(x AS Int64), UInt8/UInt16/UInt32 → CAST(x AS UInt64),
Int64/UInt64/Float64 → no cast. This avoids Float64 arithmetic overhead
during aggregation and produces more precise results for large integers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Dandandan Dandandan marked this pull request as ready for review April 14, 2026 15:30
Dandandan and others added 2 commits April 14, 2026 17:41
Instead of manually mapping each integer type to SUM's native type,
just strip the CAST(x AS Float64) added by AVG's type coercion and
let SUM apply its own coercion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove cast-stripping logic from the optimizer rule and pass
AVG's args (with their existing Float64 cast) directly to SUM.
Add coerce_types to SUM so it handles small integer/float types
via the normal planning path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the functions Changes to functions implementation label Apr 14, 2026
Avoid precision loss for Int64/UInt64 by stripping the Float64 cast
only when SUM can handle the inner type directly. For small integer
types, keep the cast so SUM operates on Float64. Update clickbench
EXPLAIN expectations to match the new plans.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert AVG(col) to SUM(x) / COUNT(*)

2 participants