branch-4.0: [fix](nereids) Fix aggregate source repeat output is different from child repeat #57840#58088
Merged
yiguolei merged 1 commit intobranch-4.0from Nov 18, 2025
Merged
Conversation
…hild repeat (#57840) if cte def has group sets, after cte inline, the aggregate source repeat output is different from child repeat the pr fix this such query as following ```sql with t as ( select t1.l_partkey, t1.l_suppkey, o_orderdate, grouping(t1.l_suppkey), grouping(o_orderdate), grouping_id(t1.l_partkey, t1.l_suppkey), grouping_id(t1.l_partkey, t1.l_suppkey, o_orderdate), sum(o_totalprice), max(o_totalprice), min(o_totalprice), count(*), count(distinct case when o_shippriority > 1 and o_orderkey IN (1, 3) then o_custkey else null end) from (select * from lineitem where l_shipdate = '2023-12-11') t1 left join orders on t1.l_orderkey = orders.o_orderkey and t1.l_shipdate = o_orderdate group by GROUPING SETS ((l_shipdate, o_orderdate, l_partkey), (l_partkey, l_suppkey), (l_suppkey), ()) ) select t1.l_suppkey, t2.o_orderdate from t t1 inner join t t2 on t1.l_partkey = t2.l_partkey; ```
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
yiguolei
approved these changes
Nov 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picked from #57840