You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 051b9ac
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](cost model) scale group-by-less global agg cost by BE number when partitioned (apache#66354)
Problem Summary:
A scalar count(distinct) runs its global aggregate hash-shuffled by the
distinct
key (non-empty partitionExpressions), i.e. in parallel across BEs. But
the cost
model set the parallelism factor from group-by keys alone, so with no
group by it
used factor = 1, costing the aggregate as single-point. This
overestimated the
parallel plan and made CBO reject it.
Solution:
Treat a global aggregate as partitioned when it has group by keys or
non-empty
partitionExpressions, and scale its cost by beNumber accordingly.
---------
Co-authored-by: yangtao555 <[email protected]>
0 commit comments