Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature](nereids) deal the slots that appear both in agg func and grouping sets #31318 #40623

Draft
wants to merge 1 commit into
base: branch-2.0
Choose a base branch
from

Conversation

feiniaofeiafei
Copy link
Contributor

cherry-pick #31318 to branch-2.0

…ouping sets (apache#31318)

this PR support slot appearing both in agg func and grouping sets.
sql like below:
select sum(a) from t group by grouping sets ((a));

Before this PR, Nereids throw exception like below:
col_int_undef_signed cannot both in select list and aggregate functions when using GROUPING SETS/CUBE/ROLLUP, please use union instead.

This PR removes the restriction and supports this situation.
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@feiniaofeiafei feiniaofeiafei changed the title [feature](nereids) deal the slots that appear both in agg func and gr… [feature](nereids) deal the slots that appear both in agg func and grouping sets #31318 () Sep 10, 2024
@feiniaofeiafei feiniaofeiafei changed the title [feature](nereids) deal the slots that appear both in agg func and grouping sets #31318 () [feature](nereids) deal the slots that appear both in agg func and grouping sets #31318 Sep 10, 2024
@xiaokang xiaokang marked this pull request as draft September 11, 2024 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants