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

[fix](Nerieds) column prune should retain at least one column for union all (#41613) #41771

Merged

Conversation

feiniaofeiafei
Copy link
Contributor

cherry-pick #41613 to branch-2.1

…on all (apache#41613)


select count(1) from(select 3, 6 union all select 1, 3) t

wrong LogicalUnion plan:

LogicalUnion( qualifier=ALL, outputs=[3#6], regularChildrenOutputs=[], constantExprsList=[[], []], hasPushedFilter=false

this sql will report error in explain, because the logical union outputs
has a slot, but the logical union has no child and has a empty
constantExprList, which is wrong set in column prune.
this pr fixes it by consider when require columns is empty and keep the
min slot and min slot corresponding const expressions.
@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
Copy link
Contributor Author

run p0

@yiguolei yiguolei merged commit afdc680 into apache:branch-2.1 Oct 14, 2024
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants