You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/08/12 06:24:34 UTC
[GitHub] [doris] englefly commented on a diff in pull request #11717: [fix](Nereids)memo copy in cannot rewrite current plan with its child
englefly commented on code in PR #11717:
URL: https://github.com/apache/doris/pull/11717#discussion_r944146690
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/Memo.java:
##########
@@ -169,7 +169,8 @@ private Pair<Boolean, GroupExpression> rewriteGroupExpression(
GroupExpression groupExpression, Group target, LogicalProperties logicalProperties) {
boolean newGroupExpressionGenerated = true;
GroupExpression existedGroupExpression = groupExpressions.get(groupExpression);
- if (existedGroupExpression != null) {
+ if (existedGroupExpression != null
+ && (target == null || target.equals(existedGroupExpression.getOwnerGroup()))) {
Review Comment:
if target is not null, and not the owner group of existedGroupExpression, should we merge them, as we do in insertGroupExpression()?
Otherwise, there are two groups with equivalent group expressions in Memo.
I think this issue is introduced by former pr, which split insertGroupExpression() and rewriteGroupExpression() from insertOrRewriteGroupExpression().
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org