Skip to content

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
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