seawinde opened a new pull request, #35026: URL: https://github.com/apache/doris/pull/35026
## Proposed changes agg_state is agg intermediate state, detail see [state combinator](https://doris.apache.org/zh-CN/docs/dev/sql-manual/sql-functions/combinators/state) this support agg function roll up as following <meta charset="utf-8"><div data-page-id="KOvCdvhfko9DqlxchM3cS95xnGh" data-docx-has-block-data="true"><div> 查询中 | 物化中 | 上卷后 -- | -- | -- agg_funtion() | agg_funtion_unoin() or agg_funtion_state() | agg_funtion_merge() agg_funtion_unoin() | agg_funtion_unoin() or agg_funtion_state() | agg_funtion_union() agg_funtion_merge() | agg_funtion_unoin() or agg_funtion_state() | agg_funtion_merge() for example which can be rewritten by mv sucessfully as following **mv def is** ``` select o_orderstatus, l_partkey, l_suppkey, sum_union(sum_state(o_shippriority)), group_concat_union(group_concat_state(l_shipinstruct)), avg_union(avg_state(l_linenumber)), max_by_union(max_by_state(l_shipmode, l_suppkey)), count_union(count_state(l_orderkey)), multi_distinct_count_union(multi_distinct_count_state(l_shipmode)) from lineitem left join orders on lineitem.l_orderkey = o_orderkey and l_shipdate = o_orderdate group by o_orderstatus, l_partkey, l_suppkey; ``` **query is** ``` select o_orderstatus, l_suppkey, sum(o_shippriority), group_concat(l_shipinstruct), avg(l_linenumber), max_by(l_shipmode,l_suppkey), count(l_orderkey), multi_distinct_count(l_shipmode) from lineitem left join orders on l_orderkey = o_orderkey and l_shipdate = o_orderdate group by o_orderstatus, l_suppkey; ``` ## Further comments If this is a relatively large or complex change, kick off the discussion at [[email protected]](mailto:[email protected]) by explaining why you chose the solution you did and what alternatives you considered, etc... -- 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]
