seawinde opened a new pull request, #38387: URL: https://github.com/apache/doris/pull/38387
## Proposed changes Not roll up when aggregate rewrite if roll up group by expr is uniform Such as mv name is mv3_0, and def is: ```sql CREATE MATERIALIZED VIEW mv3_0 BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdate, o_shippriority, o_comment, sum(o_totalprice) as sum_total, max(o_totalprice) as max_total, min(o_totalprice) as min_total, count(*) as count_all from orders group by o_orderdate, o_shippriority, o_comment; ``` query sql is as following: ```sql select o_comment, sum(o_totalprice), max(o_totalprice), min(o_totalprice), count(*) from orders where o_orderdate = '2023-12-09' and o_shippriority = 1 group by o_comment; ``` after rewrite the plan is as following, not need to add aggregate ``` PhysicalResultSink --filter((mv3_0.o_orderdate = '2023-12-09') and (mv3_0.o_shippriority = 1)) ----PhysicalOlapScan[mv3_0] ``` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org