foxtail463 opened a new pull request, #66354:
URL: https://github.com/apache/doris/pull/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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to