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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary:
   
   Eager aggregation used a `HashMap<AggregateFunction, Alias>` to track 
aggregate functions and their aliases. Structurally identical aggregate 
expressions could compare equal and overwrite each other in the map, causing 
different aggregate outputs to share incorrect alias information during rewrite.
   
   This PR:
   
   - Replaces `HashMap` with `IdentityHashMap` so each aggregate expression 
instance retains its own alias.
   - Makes `eager_aggregation_mode > 0` enable aggregation pushdown without 
requiring the heavy-join state.
   - Keeps heavy-join propagation based on the actual join statistics and 
output types.
   - Adds regression coverage for two structurally identical aggregate 
functions above a `UNION ALL` and join.
   
   ### Release note
   
   Fix incorrect eager aggregation rewriting when multiple structurally 
identical aggregate functions are present.
   
   ### Check List (For Author)
   
   - Test: Regression test
       - Added `bilateral_eager_agg` coverage for identical aggregate functions 
above `UNION ALL`.
   - Behavior changed: Yes. Identical aggregate expressions are tracked 
independently, and positive eager aggregation modes bypass statistics-based 
pushdown checks.
   - 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