Skip to content

[feature] (Nereids) Merge memo group recursively#11043

Merged
924060929 merged 10 commits intoapache:masterfrom
englefly:merge_group
Jul 22, 2022
Merged

[feature] (Nereids) Merge memo group recursively#11043
924060929 merged 10 commits intoapache:masterfrom
englefly:merge_group

Conversation

@englefly
Copy link
Contributor

@englefly englefly commented Jul 20, 2022

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)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

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

Copy link
Contributor

@924060929 924060929 left a comment

Choose a reason for hiding this comment

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

LGTM

@924060929 924060929 added approved Indicates a PR has been approved by one committer. reviewed labels Jul 22, 2022
@924060929 924060929 merged commit 34f328a into apache:master Jul 22, 2022
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.
@englefly englefly deleted the merge_group branch August 5, 2022 16:49
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. area/nereids reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants