Skip to content

fix: avoid overflow in join cardinality estimation#23788

Merged
zhuqi-lucas merged 2 commits into
apache:mainfrom
xudong963:xudong963/fix-join-multiply-overflow
Jul 22, 2026
Merged

fix: avoid overflow in join cardinality estimation#23788
zhuqi-lucas merged 2 commits into
apache:mainfrom
xudong963:xudong963/fix-join-multiply-overflow

Conversation

@xudong963

@xudong963 xudong963 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Rationale for this change

Join cardinality estimation multiplies two usize row counts before applying the join-key NDV divisor. A large Cartesian-product intermediate can therefore overflow and panic even when the normalized cardinality is representable. Saturating the product before division would avoid the panic but produce an inaccurate estimate.

What changes are included in this PR?

  • Compute the Cartesian-product intermediate with u128 before applying the NDV divisor.
  • Preserve exact estimates when the normalized result fits in usize.
  • Cap an unrepresentable final result at usize::MAX and mark it inexact, consistent with existing statistics arithmetic.
  • Add regression coverage for exact and inexact statistics and for final-result overflow.

Are these changes tested?

Yes.

Are there any user-facing changes?

Queries with very large join statistics no longer panic during cardinality estimation. There are no public API changes.

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jul 22, 2026
@xudong963 xudong963 added the bug Something isn't working label Jul 22, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.71%. Comparing base (5de7f1d) to head (ae47027).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23788      +/-   ##
==========================================
- Coverage   80.71%   80.71%   -0.01%     
==========================================
  Files        1089     1089              
  Lines      368760   368792      +32     
  Branches   368760   368792      +32     
==========================================
+ Hits       297647   297658      +11     
- Misses      53372    53387      +15     
- Partials    17741    17747       +6     

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

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

@xudong963

Copy link
Copy Markdown
Member Author

cc @asolimando in case you have a chance to review it.

@zhuqi-lucas zhuqi-lucas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Clean, targeted fix.

  • u128 widening preserves accuracy across the divide, unlike saturating_mul which would collapse to usize::MAX / ndv.
  • Exact → Inexact(usize::MAX) on final-cap is the right degradation.
  • Test picks usize::MAX / 2 + 1 × 3 — precisely the "overflow-but-recoverable" boundary. Nice.

Auto-propagates to Left/Right/Full via estimate_join_cardinality.

@zhuqi-lucas

Copy link
Copy Markdown
Contributor

run benchmark sql_planner

@adriangbot

Copy link
Copy Markdown

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

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

Comparing xudong963/fix-join-multiply-overflow (ae47027) to 5de7f1d (merge-base) diff using: sql_planner
Results will be posted here when complete


File an issue against this benchmark runner

@asolimando asolimando left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch and, as @zhuqi-lucas is saying, this allows to cover more legal cases than saturating_mul, which is nice.

Thanks for the ping for review, LGTM!

@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

group                                                 HEAD                                   xudong963_fix-join-multiply-overflow
-----                                                 ----                                   ------------------------------------
logical_aggregate_with_join                           1.01    468.6±1.29µs        ? ?/sec    1.00    464.1±1.79µs        ? ?/sec
logical_correlated_subquery_exists                    1.01    291.4±1.09µs        ? ?/sec    1.00    289.5±0.89µs        ? ?/sec
logical_correlated_subquery_in                        1.00    291.6±0.78µs        ? ?/sec    1.00    290.9±0.92µs        ? ?/sec
logical_distinct_many_columns                         1.00    584.4±1.20µs        ? ?/sec    1.00    585.0±1.40µs        ? ?/sec
logical_join_4_with_agg_and_filter                    1.03    263.2±1.26µs        ? ?/sec    1.00    255.7±1.57µs        ? ?/sec
logical_join_8_with_agg_sort_limit                    1.05    449.4±2.25µs        ? ?/sec    1.00    429.1±2.92µs        ? ?/sec
logical_join_chain_16                                 1.00    689.8±3.95µs        ? ?/sec    1.00    690.0±4.79µs        ? ?/sec
logical_join_chain_4                                  1.01    126.9±0.57µs        ? ?/sec    1.00    125.5±0.90µs        ? ?/sec
logical_join_chain_8                                  1.01    257.9±1.24µs        ? ?/sec    1.00    255.7±1.40µs        ? ?/sec
logical_multiple_subqueries                           1.00    530.5±2.12µs        ? ?/sec    1.01    534.5±5.42µs        ? ?/sec
logical_nested_cte_4_levels                           1.02    274.5±1.56µs        ? ?/sec    1.00    270.2±1.36µs        ? ?/sec
logical_plan_struct_join_agg_sort                     1.05    187.3±0.86µs        ? ?/sec    1.00    178.3±1.34µs        ? ?/sec
logical_plan_tpcds_all                                1.00     94.2±0.13ms        ? ?/sec    1.00     94.5±0.14ms        ? ?/sec
logical_plan_tpch_all                                 1.00      6.6±0.02ms        ? ?/sec    1.00      6.7±0.02ms        ? ?/sec
logical_scalar_subquery                               1.01    321.1±1.65µs        ? ?/sec    1.00    318.3±2.14µs        ? ?/sec
logical_select_all_from_1000                          1.00    106.1±0.47ms        ? ?/sec    1.00    106.6±0.55ms        ? ?/sec
logical_select_one_from_700                           1.00    330.1±2.29µs        ? ?/sec    1.00    331.1±1.82µs        ? ?/sec
logical_trivial_join_high_numbered_columns            1.01    294.0±1.22µs        ? ?/sec    1.00    291.2±0.97µs        ? ?/sec
logical_trivial_join_low_numbered_columns             1.01    282.1±1.42µs        ? ?/sec    1.00    279.3±0.93µs        ? ?/sec
logical_union_4_branches                              1.00    431.2±1.18µs        ? ?/sec    1.00    430.0±1.25µs        ? ?/sec
logical_union_8_branches                              1.00    824.6±2.97µs        ? ?/sec    1.00    824.7±2.94µs        ? ?/sec
logical_wide_aggregate_100_exprs                      1.00      4.5±0.01ms        ? ?/sec    1.00      4.5±0.01ms        ? ?/sec
logical_wide_case_50_exprs                            1.00      2.4±0.00ms        ? ?/sec    1.00      2.4±0.00ms        ? ?/sec
logical_wide_filter_200_predicates                    1.00   1318.2±6.44µs        ? ?/sec    1.01   1325.6±6.49µs        ? ?/sec
logical_wide_filter_50_predicates                     1.00    391.1±2.08µs        ? ?/sec    1.01    395.6±2.38µs        ? ?/sec
optimizer_correlated_exists                           1.00    257.3±0.72µs        ? ?/sec    1.00    256.1±0.85µs        ? ?/sec
optimizer_join_4_with_agg_filter                      1.02    480.6±1.52µs        ? ?/sec    1.00    472.2±1.87µs        ? ?/sec
optimizer_join_chain_4                                1.00    187.9±0.66µs        ? ?/sec    1.00    187.2±0.39µs        ? ?/sec
optimizer_join_chain_8                                1.00    579.7±3.01µs        ? ?/sec    1.01    583.4±1.00µs        ? ?/sec
optimizer_select_all_from_1000                        1.00      6.9±0.02ms        ? ?/sec    1.00      7.0±0.02ms        ? ?/sec
optimizer_select_one_from_700                         1.00    266.4±0.87µs        ? ?/sec    1.00    266.3±0.53µs        ? ?/sec
optimizer_tpcds_all                                   1.01    319.6±0.34ms        ? ?/sec    1.00    315.7±0.34ms        ? ?/sec
optimizer_tpch_all                                    1.02     18.1±0.04ms        ? ?/sec    1.00     17.8±0.05ms        ? ?/sec
optimizer_wide_aggregate_100                          1.01      2.3±0.02ms        ? ?/sec    1.00      2.3±0.00ms        ? ?/sec
optimizer_wide_filter_200                             1.00      3.7±0.01ms        ? ?/sec    1.02      3.8±0.01ms        ? ?/sec
physical_intersection                                 1.00    610.0±0.99µs        ? ?/sec    1.00    610.6±1.37µs        ? ?/sec
physical_join_consider_sort                           1.01   1082.8±1.64µs        ? ?/sec    1.00   1074.8±1.87µs        ? ?/sec
physical_join_distinct                                1.01    274.3±1.23µs        ? ?/sec    1.00    272.3±1.06µs        ? ?/sec
physical_many_self_joins                              1.00      7.9±0.01ms        ? ?/sec    1.00      7.9±0.01ms        ? ?/sec
physical_plan_clickbench_all                          1.00    130.1±0.32ms        ? ?/sec    1.00    129.7±1.33ms        ? ?/sec
physical_plan_clickbench_q1                           1.00   1414.8±8.94µs        ? ?/sec    1.05  1479.8±12.95µs        ? ?/sec
physical_plan_clickbench_q10                          1.00      2.1±0.01ms        ? ?/sec    1.06      2.2±0.05ms        ? ?/sec
physical_plan_clickbench_q11                          1.00      2.2±0.01ms        ? ?/sec    1.08      2.4±0.03ms        ? ?/sec
physical_plan_clickbench_q12                          1.00      2.3±0.02ms        ? ?/sec    1.06      2.5±0.05ms        ? ?/sec
physical_plan_clickbench_q13                          1.00      2.1±0.01ms        ? ?/sec    1.05      2.2±0.03ms        ? ?/sec
physical_plan_clickbench_q14                          1.00      2.2±0.01ms        ? ?/sec    1.07      2.4±0.04ms        ? ?/sec
physical_plan_clickbench_q15                          1.00      2.1±0.01ms        ? ?/sec    1.05      2.3±0.04ms        ? ?/sec
physical_plan_clickbench_q16                          1.00   1820.1±6.06µs        ? ?/sec    1.04  1895.3±29.40µs        ? ?/sec
physical_plan_clickbench_q17                          1.00   1870.1±6.38µs        ? ?/sec    1.05  1961.2±26.63µs        ? ?/sec
physical_plan_clickbench_q18                          1.00   1697.2±8.69µs        ? ?/sec    1.06  1796.3±47.97µs        ? ?/sec
physical_plan_clickbench_q19                          1.00      2.1±0.01ms        ? ?/sec    1.05      2.2±0.04ms        ? ?/sec
physical_plan_clickbench_q2                           1.00  1826.4±45.07µs        ? ?/sec    1.04  1899.6±31.02µs        ? ?/sec
physical_plan_clickbench_q20                          1.00   1563.9±6.28µs        ? ?/sec    1.05  1638.1±13.74µs        ? ?/sec
physical_plan_clickbench_q21                          1.00   1802.7±6.41µs        ? ?/sec    1.06  1902.0±42.66µs        ? ?/sec
physical_plan_clickbench_q22                          1.00      2.2±0.01ms        ? ?/sec    1.06      2.4±0.05ms        ? ?/sec
physical_plan_clickbench_q23                          1.00      2.4±0.04ms        ? ?/sec    1.06      2.6±0.04ms        ? ?/sec
physical_plan_clickbench_q24                          1.00      6.8±0.02ms        ? ?/sec    1.07      7.3±0.03ms        ? ?/sec
physical_plan_clickbench_q25                          1.00   1935.9±6.64µs        ? ?/sec    1.03      2.0±0.03ms        ? ?/sec
physical_plan_clickbench_q26                          1.00   1762.8±6.83µs        ? ?/sec    1.04  1829.0±21.44µs        ? ?/sec
physical_plan_clickbench_q27                          1.00   1963.6±8.28µs        ? ?/sec    1.04      2.0±0.03ms        ? ?/sec
physical_plan_clickbench_q28                          1.00      2.4±0.01ms        ? ?/sec    1.04      2.5±0.04ms        ? ?/sec
physical_plan_clickbench_q29                          1.00      2.6±0.01ms        ? ?/sec    1.06      2.7±0.09ms        ? ?/sec
physical_plan_clickbench_q3                           1.00   1706.9±6.65µs        ? ?/sec    1.04  1779.1±30.35µs        ? ?/sec
physical_plan_clickbench_q30                          1.00     15.6±0.06ms        ? ?/sec    1.04     16.2±0.04ms        ? ?/sec
physical_plan_clickbench_q31                          1.00      2.5±0.01ms        ? ?/sec    1.09      2.8±0.06ms        ? ?/sec
physical_plan_clickbench_q32                          1.00      2.5±0.01ms        ? ?/sec    1.06      2.7±0.06ms        ? ?/sec
physical_plan_clickbench_q33                          1.00      2.1±0.01ms        ? ?/sec    1.05      2.2±0.04ms        ? ?/sec
physical_plan_clickbench_q34                          1.00  1867.3±11.67µs        ? ?/sec    1.03  1919.3±40.46µs        ? ?/sec
physical_plan_clickbench_q35                          1.00   1893.1±7.67µs        ? ?/sec    1.05  1981.2±44.89µs        ? ?/sec
physical_plan_clickbench_q36                          1.00      2.2±0.01ms        ? ?/sec    1.06      2.3±0.03ms        ? ?/sec
physical_plan_clickbench_q37                          1.00      2.6±0.01ms        ? ?/sec    1.08      2.8±0.12ms        ? ?/sec
physical_plan_clickbench_q38                          1.00      2.6±0.01ms        ? ?/sec    1.07      2.8±0.05ms        ? ?/sec
physical_plan_clickbench_q39                          1.00      2.7±0.01ms        ? ?/sec    1.06      2.8±0.05ms        ? ?/sec
physical_plan_clickbench_q4                           1.00   1507.7±6.66µs        ? ?/sec    1.03  1547.2±20.02µs        ? ?/sec
physical_plan_clickbench_q40                          1.00      3.4±0.01ms        ? ?/sec    1.10      3.8±0.04ms        ? ?/sec
physical_plan_clickbench_q41                          1.00      2.9±0.01ms        ? ?/sec    1.02      3.0±0.04ms        ? ?/sec
physical_plan_clickbench_q42                          1.01      3.1±0.02ms        ? ?/sec    1.00      3.1±0.01ms        ? ?/sec
physical_plan_clickbench_q43                          1.01      3.2±0.01ms        ? ?/sec    1.00      3.2±0.01ms        ? ?/sec
physical_plan_clickbench_q44                          1.01   1600.2±7.28µs        ? ?/sec    1.00   1586.9±5.41µs        ? ?/sec
physical_plan_clickbench_q45                          1.01   1607.8±6.75µs        ? ?/sec    1.00   1590.6±5.77µs        ? ?/sec
physical_plan_clickbench_q46                          1.01   1922.6±7.27µs        ? ?/sec    1.00   1907.9±6.32µs        ? ?/sec
physical_plan_clickbench_q47                          1.01      2.7±0.01ms        ? ?/sec    1.00      2.6±0.01ms        ? ?/sec
physical_plan_clickbench_q48                          1.02      2.8±0.01ms        ? ?/sec    1.00      2.8±0.01ms        ? ?/sec
physical_plan_clickbench_q49                          1.01      2.9±0.01ms        ? ?/sec    1.00      2.9±0.01ms        ? ?/sec
physical_plan_clickbench_q5                           1.00   1645.3±6.98µs        ? ?/sec    1.03  1693.7±23.43µs        ? ?/sec
physical_plan_clickbench_q50                          1.01      2.7±0.01ms        ? ?/sec    1.00      2.7±0.01ms        ? ?/sec
physical_plan_clickbench_q51                          1.01      2.1±0.01ms        ? ?/sec    1.00      2.0±0.01ms        ? ?/sec
physical_plan_clickbench_q6                           1.00  1660.3±10.58µs        ? ?/sec    1.05  1736.4±44.49µs        ? ?/sec
physical_plan_clickbench_q7                           1.00  1475.0±12.09µs        ? ?/sec    1.04  1532.4±31.29µs        ? ?/sec
physical_plan_clickbench_q8                           1.00   1965.7±7.45µs        ? ?/sec    1.06      2.1±0.05ms        ? ?/sec
physical_plan_clickbench_q9                           1.00   1967.7±7.04µs        ? ?/sec    1.08      2.1±0.08ms        ? ?/sec
physical_plan_struct_join_agg_sort                    1.02   1362.6±2.52µs        ? ?/sec    1.00   1339.9±3.14µs        ? ?/sec
physical_plan_tpcds_all                               1.00    747.7±1.05ms        ? ?/sec    1.03    769.9±2.85ms        ? ?/sec
physical_plan_tpch_all                                1.00     47.0±0.06ms        ? ?/sec    1.04     48.7±0.42ms        ? ?/sec
physical_plan_tpch_q1                                 1.02   1594.5±2.52µs        ? ?/sec    1.00   1565.8±5.43µs        ? ?/sec
physical_plan_tpch_q10                                1.00      3.0±0.00ms        ? ?/sec    1.02      3.1±0.05ms        ? ?/sec
physical_plan_tpch_q11                                1.00      2.4±0.00ms        ? ?/sec    1.03      2.4±0.03ms        ? ?/sec
physical_plan_tpch_q12                                1.02   1310.8±5.81µs        ? ?/sec    1.00  1284.1±10.82µs        ? ?/sec
physical_plan_tpch_q13                                1.01   1089.6±2.58µs        ? ?/sec    1.00   1079.6±3.24µs        ? ?/sec
physical_plan_tpch_q14                                1.02   1487.9±3.98µs        ? ?/sec    1.00  1465.2±14.54µs        ? ?/sec
physical_plan_tpch_q16                                1.01   1714.7±2.91µs        ? ?/sec    1.00  1705.0±25.69µs        ? ?/sec
physical_plan_tpch_q17                                1.01   1794.0±4.13µs        ? ?/sec    1.00  1780.8±73.87µs        ? ?/sec
physical_plan_tpch_q18                                1.01      2.0±0.00ms        ? ?/sec    1.00      2.0±0.03ms        ? ?/sec
physical_plan_tpch_q19                                1.01   1969.7±4.08µs        ? ?/sec    1.00  1947.3±35.33µs        ? ?/sec
physical_plan_tpch_q2                                 1.00      3.8±0.00ms        ? ?/sec    1.00      3.8±0.01ms        ? ?/sec
physical_plan_tpch_q20                                1.00      2.3±0.00ms        ? ?/sec    1.02      2.3±0.03ms        ? ?/sec
physical_plan_tpch_q21                                1.00      3.1±0.00ms        ? ?/sec    1.03      3.1±0.02ms        ? ?/sec
physical_plan_tpch_q22                                1.00   1595.1±3.78µs        ? ?/sec    1.00  1598.2±11.85µs        ? ?/sec
physical_plan_tpch_q3                                 1.01   1988.6±3.06µs        ? ?/sec    1.00   1970.3±7.05µs        ? ?/sec
physical_plan_tpch_q4                                 1.01   1261.4±2.20µs        ? ?/sec    1.00   1253.2±2.73µs        ? ?/sec
physical_plan_tpch_q5                                 1.01      2.9±0.02ms        ? ?/sec    1.00      2.9±0.01ms        ? ?/sec
physical_plan_tpch_q6                                 1.00    664.8±1.68µs        ? ?/sec    1.00    663.5±4.35µs        ? ?/sec
physical_plan_tpch_q7                                 1.00      3.0±0.00ms        ? ?/sec    1.00      3.1±0.00ms        ? ?/sec
physical_plan_tpch_q8                                 1.00      4.1±0.03ms        ? ?/sec    1.03      4.3±0.06ms        ? ?/sec
physical_plan_tpch_q9                                 1.00      2.8±0.02ms        ? ?/sec    1.03      2.9±0.02ms        ? ?/sec
physical_select_aggregates_from_200                   1.01     15.7±0.07ms        ? ?/sec    1.00     15.6±0.03ms        ? ?/sec
physical_select_all_from_1000                         1.00    117.2±0.40ms        ? ?/sec    1.00    117.4±0.40ms        ? ?/sec
physical_select_one_from_700                          1.00    794.5±2.41µs        ? ?/sec    1.00    792.6±1.51µs        ? ?/sec
physical_sorted_union_order_by_10_int64               1.01      4.3±0.01ms        ? ?/sec    1.00      4.3±0.00ms        ? ?/sec
physical_sorted_union_order_by_10_uint64              1.00      9.2±0.03ms        ? ?/sec    1.00      9.2±0.01ms        ? ?/sec
physical_sorted_union_order_by_50_int64               1.00    106.7±0.22ms        ? ?/sec    1.00    106.2±0.34ms        ? ?/sec
physical_sorted_union_order_by_50_uint64              1.00    414.5±1.18ms        ? ?/sec    1.00    412.9±1.10ms        ? ?/sec
physical_theta_join_consider_sort                     1.01   1109.4±2.96µs        ? ?/sec    1.00   1098.5±3.35µs        ? ?/sec
physical_unnest_to_join                               1.00    657.3±1.75µs        ? ?/sec    1.00    657.6±6.25µs        ? ?/sec
physical_window_function_partition_by_12_on_values    1.01    737.4±1.84µs        ? ?/sec    1.00    731.4±5.52µs        ? ?/sec
physical_window_function_partition_by_30_on_values    1.01   1445.0±3.48µs        ? ?/sec    1.00   1432.1±4.20µs        ? ?/sec
physical_window_function_partition_by_4_on_values     1.04    463.1±3.99µs        ? ?/sec    1.00    447.1±1.58µs        ? ?/sec
physical_window_function_partition_by_7_on_values     1.02    560.8±1.59µs        ? ?/sec    1.00    547.6±1.44µs        ? ?/sec
physical_window_function_partition_by_8_on_values     1.02    598.9±1.46µs        ? ?/sec    1.00    589.1±4.35µs        ? ?/sec
with_param_values_many_columns                        1.01    430.9±2.09µs        ? ?/sec    1.00    427.7±1.93µs        ? ?/sec

Resource Usage

sql_planner — base (merge-base)

Metric Value
Wall time 2255.5s
Peak memory 127.4 MiB
Avg memory 69.2 MiB
CPU user 1895.9s
CPU sys 1.3s
Peak spill 0 B

sql_planner — branch

Metric Value
Wall time 2445.5s
Peak memory 132.4 MiB
Avg memory 66.2 MiB
CPU user 1889.3s
CPU sys 1.4s
Peak spill 0 B

File an issue against this benchmark runner

@xudong963
xudong963 added this pull request to the merge queue Jul 22, 2026
@zhuqi-lucas

zhuqi-lucas commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@xudong963 It looks regression for many cases from the sqlplanner, removed from the merge queue.

@zhuqi-lucas
zhuqi-lucas removed this pull request from the merge queue due to a manual request Jul 22, 2026
@zhuqi-lucas

Copy link
Copy Markdown
Contributor

run benchmark sql_planner

@zhuqi-lucas

zhuqi-lucas commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

I rerun the benchmark again to see if it's noisy, and we can merge it after double check.

@adriangbot

Copy link
Copy Markdown

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

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

Comparing xudong963/fix-join-multiply-overflow (29bf69b) to dfe0f26 (merge-base) diff using: sql_planner
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

group                                                 HEAD                                   xudong963_fix-join-multiply-overflow
-----                                                 ----                                   ------------------------------------
logical_aggregate_with_join                           1.00    455.3±1.45µs        ? ?/sec    1.01    462.1±1.40µs        ? ?/sec
logical_correlated_subquery_exists                    1.00    287.7±0.85µs        ? ?/sec    1.01    291.3±0.90µs        ? ?/sec
logical_correlated_subquery_in                        1.00    288.7±0.86µs        ? ?/sec    1.02    294.5±5.85µs        ? ?/sec
logical_distinct_many_columns                         1.00    583.6±1.05µs        ? ?/sec    1.00    586.2±1.39µs        ? ?/sec
logical_join_4_with_agg_and_filter                    1.00    251.4±2.09µs        ? ?/sec    1.03    259.1±2.33µs        ? ?/sec
logical_join_8_with_agg_sort_limit                    1.00    420.4±2.31µs        ? ?/sec    1.03    433.6±1.44µs        ? ?/sec
logical_join_chain_16                                 1.00    684.1±5.53µs        ? ?/sec    1.01    691.0±4.05µs        ? ?/sec
logical_join_chain_4                                  1.00    125.2±0.58µs        ? ?/sec    1.01    126.0±0.71µs        ? ?/sec
logical_join_chain_8                                  1.00    255.9±1.02µs        ? ?/sec    1.01    259.3±1.92µs        ? ?/sec
logical_multiple_subqueries                           1.00    524.0±2.33µs        ? ?/sec    1.02    532.3±6.00µs        ? ?/sec
logical_nested_cte_4_levels                           1.00    271.8±1.11µs        ? ?/sec    1.02    278.2±0.89µs        ? ?/sec
logical_plan_struct_join_agg_sort                     1.00    180.4±1.08µs        ? ?/sec    1.01    181.8±0.90µs        ? ?/sec
logical_plan_tpcds_all                                1.00     93.6±0.16ms        ? ?/sec    1.01     95.0±0.15ms        ? ?/sec
logical_plan_tpch_all                                 1.00      6.5±0.02ms        ? ?/sec    1.03      6.7±0.02ms        ? ?/sec
logical_scalar_subquery                               1.00    311.4±0.89µs        ? ?/sec    1.01    314.6±0.67µs        ? ?/sec
logical_select_all_from_1000                          1.00    106.1±0.27ms        ? ?/sec    1.01    106.6±0.55ms        ? ?/sec
logical_select_one_from_700                           1.00    330.8±2.10µs        ? ?/sec    1.02    337.9±1.99µs        ? ?/sec
logical_trivial_join_high_numbered_columns            1.00    289.4±0.82µs        ? ?/sec    1.01    292.0±0.68µs        ? ?/sec
logical_trivial_join_low_numbered_columns             1.00    277.4±0.76µs        ? ?/sec    1.01    280.6±0.67µs        ? ?/sec
logical_union_4_branches                              1.00    430.5±1.09µs        ? ?/sec    1.01    436.2±1.90µs        ? ?/sec
logical_union_8_branches                              1.00    824.1±2.34µs        ? ?/sec    1.01    833.6±2.78µs        ? ?/sec
logical_wide_aggregate_100_exprs                      1.00      4.5±0.01ms        ? ?/sec    1.00      4.5±0.02ms        ? ?/sec
logical_wide_case_50_exprs                            1.00      2.4±0.01ms        ? ?/sec    1.00      2.4±0.01ms        ? ?/sec
logical_wide_filter_200_predicates                    1.00   1315.9±9.52µs        ? ?/sec    1.00   1313.8±8.87µs        ? ?/sec
logical_wide_filter_50_predicates                     1.00    393.9±2.64µs        ? ?/sec    1.01    397.4±1.71µs        ? ?/sec
optimizer_correlated_exists                           1.00    256.5±0.61µs        ? ?/sec    1.01    258.1±0.66µs        ? ?/sec
optimizer_join_4_with_agg_filter                      1.00    474.5±2.30µs        ? ?/sec    1.01    479.0±5.30µs        ? ?/sec
optimizer_join_chain_4                                1.00    186.6±0.40µs        ? ?/sec    1.01    188.3±0.48µs        ? ?/sec
optimizer_join_chain_8                                1.00    584.4±1.56µs        ? ?/sec    1.00    583.4±2.32µs        ? ?/sec
optimizer_select_all_from_1000                        1.00      7.0±0.03ms        ? ?/sec    1.00      7.0±0.03ms        ? ?/sec
optimizer_select_one_from_700                         1.00    264.8±0.63µs        ? ?/sec    1.01    267.4±0.87µs        ? ?/sec
optimizer_tpcds_all                                   1.00    317.1±0.51ms        ? ?/sec    1.00    318.7±1.83ms        ? ?/sec
optimizer_tpch_all                                    1.00     17.8±0.04ms        ? ?/sec    1.00     17.9±0.12ms        ? ?/sec
optimizer_wide_aggregate_100                          1.00      2.3±0.01ms        ? ?/sec    1.00      2.3±0.00ms        ? ?/sec
optimizer_wide_filter_200                             1.01      3.8±0.01ms        ? ?/sec    1.00      3.8±0.01ms        ? ?/sec
physical_intersection                                 1.00    603.8±1.45µs        ? ?/sec    1.00    600.9±1.88µs        ? ?/sec
physical_join_consider_sort                           1.00   1061.5±3.42µs        ? ?/sec    1.00   1064.3±2.45µs        ? ?/sec
physical_join_distinct                                1.00    271.8±0.87µs        ? ?/sec    1.01    274.6±1.23µs        ? ?/sec
physical_many_self_joins                              1.00      7.9±0.02ms        ? ?/sec    1.00      7.9±0.03ms        ? ?/sec
physical_plan_clickbench_all                          1.00    130.7±0.90ms        ? ?/sec    1.02    133.5±0.63ms        ? ?/sec
physical_plan_clickbench_q1                           1.01   1423.6±8.29µs        ? ?/sec    1.00   1406.9±7.11µs        ? ?/sec
physical_plan_clickbench_q10                          1.00      2.1±0.01ms        ? ?/sec    1.01      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q11                          1.00      2.2±0.01ms        ? ?/sec    1.01      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q12                          1.00      2.3±0.01ms        ? ?/sec    1.00      2.3±0.01ms        ? ?/sec
physical_plan_clickbench_q13                          1.00      2.1±0.01ms        ? ?/sec    1.01      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q14                          1.00      2.3±0.01ms        ? ?/sec    1.01      2.3±0.02ms        ? ?/sec
physical_plan_clickbench_q15                          1.00      2.2±0.01ms        ? ?/sec    1.01      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q16                          1.00   1841.2±7.37µs        ? ?/sec    1.01  1859.5±10.38µs        ? ?/sec
physical_plan_clickbench_q17                          1.00   1892.8±8.20µs        ? ?/sec    1.01   1908.3±9.27µs        ? ?/sec
physical_plan_clickbench_q18                          1.00   1721.0±5.65µs        ? ?/sec    1.01  1734.4±11.42µs        ? ?/sec
physical_plan_clickbench_q19                          1.00      2.1±0.01ms        ? ?/sec    1.00      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q2                           1.01   1813.6±6.87µs        ? ?/sec    1.00   1801.1±4.86µs        ? ?/sec
physical_plan_clickbench_q20                          1.00  1576.8±13.08µs        ? ?/sec    1.00   1582.6±6.01µs        ? ?/sec
physical_plan_clickbench_q21                          1.00  1821.4±14.97µs        ? ?/sec    1.00  1817.5±13.68µs        ? ?/sec
physical_plan_clickbench_q22                          1.00      2.2±0.02ms        ? ?/sec    1.00      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q23                          1.00      2.4±0.01ms        ? ?/sec    1.00      2.4±0.01ms        ? ?/sec
physical_plan_clickbench_q24                          1.00      6.9±0.05ms        ? ?/sec    1.00      6.9±0.05ms        ? ?/sec
physical_plan_clickbench_q25                          1.00   1940.9±5.80µs        ? ?/sec    1.01  1954.0±12.95µs        ? ?/sec
physical_plan_clickbench_q26                          1.00   1764.2±6.17µs        ? ?/sec    1.00   1760.4±5.45µs        ? ?/sec
physical_plan_clickbench_q27                          1.01   1972.3±7.98µs        ? ?/sec    1.00   1959.2±5.78µs        ? ?/sec
physical_plan_clickbench_q28                          1.00      2.4±0.01ms        ? ?/sec    1.00      2.4±0.01ms        ? ?/sec
physical_plan_clickbench_q29                          1.00      2.6±0.01ms        ? ?/sec    1.00      2.6±0.01ms        ? ?/sec
physical_plan_clickbench_q3                           1.01   1708.7±7.38µs        ? ?/sec    1.00   1696.0±5.10µs        ? ?/sec
physical_plan_clickbench_q30                          1.00     15.7±0.06ms        ? ?/sec    1.00     15.7±0.06ms        ? ?/sec
physical_plan_clickbench_q31                          1.00      2.5±0.01ms        ? ?/sec    1.00      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q32                          1.00      2.5±0.01ms        ? ?/sec    1.00      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q33                          1.00      2.1±0.01ms        ? ?/sec    1.01      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q34                          1.00   1824.0±6.53µs        ? ?/sec    1.02   1862.5±5.94µs        ? ?/sec
physical_plan_clickbench_q35                          1.00   1870.8±7.15µs        ? ?/sec    1.02   1910.2±6.62µs        ? ?/sec
physical_plan_clickbench_q36                          1.00      2.2±0.02ms        ? ?/sec    1.02      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q37                          1.00      2.6±0.01ms        ? ?/sec    1.01      2.6±0.01ms        ? ?/sec
physical_plan_clickbench_q38                          1.00      2.6±0.01ms        ? ?/sec    1.01      2.6±0.01ms        ? ?/sec
physical_plan_clickbench_q39                          1.00      2.6±0.01ms        ? ?/sec    1.01      2.7±0.01ms        ? ?/sec
physical_plan_clickbench_q4                           1.01   1519.5±7.88µs        ? ?/sec    1.00   1502.0±4.21µs        ? ?/sec
physical_plan_clickbench_q40                          1.00      3.4±0.01ms        ? ?/sec    1.00      3.4±0.01ms        ? ?/sec
physical_plan_clickbench_q41                          1.00      2.9±0.01ms        ? ?/sec    1.00      2.9±0.01ms        ? ?/sec
physical_plan_clickbench_q42                          1.00      3.1±0.01ms        ? ?/sec    1.01      3.1±0.01ms        ? ?/sec
physical_plan_clickbench_q43                          1.00      3.2±0.01ms        ? ?/sec    1.00      3.2±0.01ms        ? ?/sec
physical_plan_clickbench_q44                          1.01   1603.2±7.44µs        ? ?/sec    1.00  1585.0±16.93µs        ? ?/sec
physical_plan_clickbench_q45                          1.00   1600.0±5.61µs        ? ?/sec    1.00   1593.3±6.18µs        ? ?/sec
physical_plan_clickbench_q46                          1.00   1915.8±6.39µs        ? ?/sec    1.00   1913.8±6.90µs        ? ?/sec
physical_plan_clickbench_q47                          1.00      2.6±0.01ms        ? ?/sec    1.00      2.6±0.01ms        ? ?/sec
physical_plan_clickbench_q48                          1.01      2.9±0.01ms        ? ?/sec    1.00      2.8±0.01ms        ? ?/sec
physical_plan_clickbench_q49                          1.00      2.9±0.03ms        ? ?/sec    1.00      2.9±0.01ms        ? ?/sec
physical_plan_clickbench_q5                           1.01   1652.3±6.52µs        ? ?/sec    1.00   1639.3±5.57µs        ? ?/sec
physical_plan_clickbench_q50                          1.00      2.7±0.01ms        ? ?/sec    1.00      2.7±0.01ms        ? ?/sec
physical_plan_clickbench_q51                          1.00      2.1±0.01ms        ? ?/sec    1.00      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q6                           1.01   1659.7±7.30µs        ? ?/sec    1.00   1647.5±5.31µs        ? ?/sec
physical_plan_clickbench_q7                           1.00   1454.3±7.79µs        ? ?/sec    1.01   1469.0±8.30µs        ? ?/sec
physical_plan_clickbench_q8                           1.00   1948.8±7.94µs        ? ?/sec    1.01   1964.2±7.85µs        ? ?/sec
physical_plan_clickbench_q9                           1.00   1958.2±7.90µs        ? ?/sec    1.01  1981.3±14.50µs        ? ?/sec
physical_plan_struct_join_agg_sort                    1.00   1356.3±2.97µs        ? ?/sec    1.01   1366.8±4.10µs        ? ?/sec
physical_plan_tpcds_all                               1.00    748.7±2.90ms        ? ?/sec    1.01    753.1±3.39ms        ? ?/sec
physical_plan_tpch_all                                1.00     46.8±0.15ms        ? ?/sec    1.00     47.0±0.08ms        ? ?/sec
physical_plan_tpch_q1                                 1.00   1572.5±4.69µs        ? ?/sec    1.00   1572.9±3.23µs        ? ?/sec
physical_plan_tpch_q10                                1.00      3.0±0.01ms        ? ?/sec    1.01      3.0±0.01ms        ? ?/sec
physical_plan_tpch_q11                                1.00      2.3±0.00ms        ? ?/sec    1.01      2.4±0.01ms        ? ?/sec
physical_plan_tpch_q12                                1.00   1278.3±2.81µs        ? ?/sec    1.01   1292.9±4.41µs        ? ?/sec
physical_plan_tpch_q13                                1.00   1072.4±3.58µs        ? ?/sec    1.01   1080.4±4.17µs        ? ?/sec
physical_plan_tpch_q14                                1.00   1443.7±2.29µs        ? ?/sec    1.01   1462.7±3.90µs        ? ?/sec
physical_plan_tpch_q16                                1.00   1685.9±3.99µs        ? ?/sec    1.00   1690.4±3.26µs        ? ?/sec
physical_plan_tpch_q17                                1.00   1743.0±4.10µs        ? ?/sec    1.01   1765.4±3.27µs        ? ?/sec
physical_plan_tpch_q18                                1.00      2.0±0.00ms        ? ?/sec    1.00      2.0±0.00ms        ? ?/sec
physical_plan_tpch_q19                                1.00   1919.3±6.01µs        ? ?/sec    1.01   1935.4±3.97µs        ? ?/sec
physical_plan_tpch_q2                                 1.00      3.8±0.01ms        ? ?/sec    1.00      3.8±0.01ms        ? ?/sec
physical_plan_tpch_q20                                1.00      2.3±0.00ms        ? ?/sec    1.01      2.3±0.00ms        ? ?/sec
physical_plan_tpch_q21                                1.00      3.0±0.02ms        ? ?/sec    1.01      3.1±0.00ms        ? ?/sec
physical_plan_tpch_q22                                1.00   1577.5±4.42µs        ? ?/sec    1.00   1571.1±3.59µs        ? ?/sec
physical_plan_tpch_q3                                 1.00   1967.7±5.62µs        ? ?/sec    1.01   1991.5±4.54µs        ? ?/sec
physical_plan_tpch_q4                                 1.00   1256.0±3.02µs        ? ?/sec    1.00   1260.6±3.24µs        ? ?/sec
physical_plan_tpch_q5                                 1.00      2.9±0.01ms        ? ?/sec    1.01      2.9±0.01ms        ? ?/sec
physical_plan_tpch_q6                                 1.00    650.7±1.47µs        ? ?/sec    1.02    664.5±1.30µs        ? ?/sec
physical_plan_tpch_q7                                 1.00      3.0±0.00ms        ? ?/sec    1.01      3.1±0.01ms        ? ?/sec
physical_plan_tpch_q8                                 1.00      4.1±0.02ms        ? ?/sec    1.01      4.1±0.01ms        ? ?/sec
physical_plan_tpch_q9                                 1.00      2.8±0.00ms        ? ?/sec    1.01      2.8±0.01ms        ? ?/sec
physical_select_aggregates_from_200                   1.00     15.6±0.03ms        ? ?/sec    1.00     15.7±0.03ms        ? ?/sec
physical_select_all_from_1000                         1.00    117.3±0.46ms        ? ?/sec    1.00    117.7±0.45ms        ? ?/sec
physical_select_one_from_700                          1.00    791.1±3.02µs        ? ?/sec    1.00    793.1±3.16µs        ? ?/sec
physical_sorted_union_order_by_10_int64               1.00      4.3±0.01ms        ? ?/sec    1.00      4.3±0.01ms        ? ?/sec
physical_sorted_union_order_by_10_uint64              1.00      9.2±0.04ms        ? ?/sec    1.00      9.3±0.02ms        ? ?/sec
physical_sorted_union_order_by_50_int64               1.00    107.1±0.67ms        ? ?/sec    1.00    107.3±0.30ms        ? ?/sec
physical_sorted_union_order_by_50_uint64              1.00    417.3±1.37ms        ? ?/sec    1.00    416.3±1.91ms        ? ?/sec
physical_theta_join_consider_sort                     1.00   1087.9±2.18µs        ? ?/sec    1.01   1094.2±3.77µs        ? ?/sec
physical_unnest_to_join                               1.00    648.6±1.52µs        ? ?/sec    1.00    650.2±3.45µs        ? ?/sec
physical_window_function_partition_by_12_on_values    1.00    712.9±2.10µs        ? ?/sec    1.01    722.0±1.66µs        ? ?/sec
physical_window_function_partition_by_30_on_values    1.00   1416.4±2.97µs        ? ?/sec    1.01   1427.9±2.45µs        ? ?/sec
physical_window_function_partition_by_4_on_values     1.00    436.0±1.47µs        ? ?/sec    1.04    453.7±1.56µs        ? ?/sec
physical_window_function_partition_by_7_on_values     1.00    537.8±1.54µs        ? ?/sec    1.03    555.7±1.72µs        ? ?/sec
physical_window_function_partition_by_8_on_values     1.00    577.0±1.16µs        ? ?/sec    1.04    599.2±2.00µs        ? ?/sec
with_param_values_many_columns                        1.00    428.8±2.20µs        ? ?/sec    1.00    430.6±3.08µs        ? ?/sec

Resource Usage

sql_planner — base (merge-base)

Metric Value
Wall time 2125.5s
Peak memory 133.5 MiB
Avg memory 76.8 MiB
CPU user 1902.1s
CPU sys 1.3s
Peak spill 0 B

sql_planner — branch

Metric Value
Wall time 2125.5s
Peak memory 130.7 MiB
Avg memory 76.1 MiB
CPU user 1906.9s
CPU sys 1.3s
Peak spill 0 B

File an issue against this benchmark runner

@zhuqi-lucas

Copy link
Copy Markdown
Contributor

The latest benchmark is ok.

@zhuqi-lucas
zhuqi-lucas enabled auto-merge July 22, 2026 11:57
@zhuqi-lucas
zhuqi-lucas added this pull request to the merge queue Jul 22, 2026
Merged via the queue into apache:main with commit 05b7e11 Jul 22, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Join cardinality estimation can overflow row count multiplication

5 participants