[feature] (Nereids) Merge memo group recursively#11043
Merged
924060929 merged 10 commits intoapache:masterfrom Jul 22, 2022
Merged
[feature] (Nereids) Merge memo group recursively#11043924060929 merged 10 commits intoapache:masterfrom
924060929 merged 10 commits intoapache:masterfrom
Conversation
morrySnow
reviewed
Jul 20, 2022
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/Group.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/test/java/org/apache/doris/nereids/memo/MemoTest.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/test/java/org/apache/doris/nereids/memo/MemoTest.java
Outdated
Show resolved
Hide resolved
924060929
reviewed
Jul 21, 2022
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/Memo.java
Outdated
Show resolved
Hide resolved
miswujian
pushed a commit
to miswujian/doris
that referenced
this pull request
Jul 28, 2022
In Memo.copyIn( plan, group1, isRewrite), one branch is that the plan is already recorded in Memo, and owned by group 'group2'. In such case, 'group1' should be merged with 'group2', because they are equivalent. After merge, the upper level of 'group1', saying 'p1 = group1.getLogicalExpression().getOwnerGroup()' of 'group1', and that of 'group2', saying 'p2', are equivalent. We need to merge 'p1' and 'p2'. And this process is recursive.
whutpencil
pushed a commit
to whutpencil/incubator-doris
that referenced
this pull request
Jul 29, 2022
In Memo.copyIn( plan, group1, isRewrite), one branch is that the plan is already recorded in Memo, and owned by group 'group2'. In such case, 'group1' should be merged with 'group2', because they are equivalent. After merge, the upper level of 'group1', saying 'p1 = group1.getLogicalExpression().getOwnerGroup()' of 'group1', and that of 'group2', saying 'p2', are equivalent. We need to merge 'p1' and 'p2'. And this process is recursive.
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.
Proposed changes
In Memo.copyIn( plan, group1, isRewrite), one branch is that the plan is already recorded in Memo, and owned by group 'group2'. In such case, 'group1' should be merged with 'group2', because they are equivalent.
After merge, the upper level of 'group1', saying 'p1 = group1.getLogicalExpression().getOwnerGroup()' of 'group1', and that of 'group2', saying 'p2', are equivalent. We need to merge 'p1' and 'p2'. And this process is recursive.
@morrySnow could you review thie pr, please?
Issue Number: close #xxx
Problem Summary:
Describe the overview of changes.
Checklist(Required)
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...