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

[feat](nereids)add more rules to eliminate empty relation #34997

Merged
merged 2 commits into from
May 21, 2024

Conversation

englefly
Copy link
Contributor

Proposed changes

eliminate empty relations for following patterns:
topn->empty
sort->empty
distribute->empty
project->empty

Issue Number: close #xxx

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

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

@englefly
Copy link
Contributor Author

run buildall

Comment on lines 54 to 55
// .when(this::hasEmptyRelationChild)
// .when(this::canReplaceJoinByEmptyRelation)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove useless code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 57 to 58
if (hasEmptyRelationChild(join) && canReplaceJoinByEmptyRelation(join)
|| bothChildrenEmpty(join)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use when for better performance

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@englefly
Copy link
Contributor Author

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 21, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

@morrySnow morrySnow merged commit 8340f23 into apache:master May 21, 2024
27 of 30 checks passed
M1saka2003 pushed a commit to M1saka2003/doris that referenced this pull request May 24, 2024
)

eliminate empty relations for following patterns:
topn->empty
sort->empty
distribute->empty
project->empty
dataroaring pushed a commit that referenced this pull request May 26, 2024
eliminate empty relations for following patterns:
topn->empty
sort->empty
distribute->empty
project->empty
englefly added a commit to englefly/incubator-doris that referenced this pull request May 28, 2024
)

eliminate empty relations for following patterns:
topn->empty
sort->empty
distribute->empty
project->empty

(cherry picked from commit 8340f23)
yiguolei pushed a commit that referenced this pull request May 28, 2024
…branch-2.1 (#35534)

eliminate empty relations for following patterns:
topn->empty
sort->empty
distribute->empty
project->empty

(cherry picked from commit 8340f23)

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->

## Further comments

If this is a relatively large or complex change, kick off the discussion
at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why
you chose the solution you did and what alternatives you considered,
etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.1.4-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants