BiteTheDDDDt opened a new pull request, #63732:
URL: https://github.com/apache/doris/pull/63732

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: In a single-BE single-instance execution, non-distinct 
aggregation does not benefit from splitting into local and global phases. The 
split can add an unnecessary hash exchange and extra aggregate operator for 
high-cardinality group-by queries. This change detects the single execution 
instance case during Nereids non-distinct aggregate implementation and only 
generates the one-phase aggregate candidate. It also lets the global aggregate 
request ANY child distribution in that case so the optimizer does not add a 
redundant exchange.
   
   ### Release note
   
   Optimize aggregation planning for single-BE single-instance execution by 
avoiding unnecessary local/global aggregate split.
   
   ### Check List (For Author)
   
   - Test: FE Unit Test
       - ./run-fe-ut.sh --run 
org.apache.doris.nereids.rules.implementation.BucketedAggregateTest,org.apache.doris.nereids.properties.RequestPropertyDeriverTest
       - cd fe && mvn checkstyle:check -pl fe-core
   - Behavior changed: Yes. Non-distinct aggregate in single-BE single-instance 
execution uses a one-phase plan in auto agg phase.
   - Does this need documentation: No


-- 
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