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 2023/01/12 08:44:53 UTC

[GitHub] [doris] morrySnow commented on a diff in pull request #15833: [fix](Nereids): add unusedFlag to avoid job run used GroupExprssion

morrySnow commented on code in PR #15833:
URL: https://github.com/apache/doris/pull/15833#discussion_r1067844668


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/Memo.java:
##########
@@ -465,6 +468,8 @@ public Group mergeGroup(Group source, Group destination) {
             source.moveOwnership(destination);
             groups.remove(source.getGroupId());
         }
+
+        needMergeGroups.forEach(this::mergeGroup);

Review Comment:
   consider a scenario:
   if we have two entry in the map: B -> A and C -> B.
   when we do merge group. we first merge B to A, and then B is removed. after that, we want to merge C to B, but B is not exist anymore.
   So, maybe we need to use **disjoint set** do find a common parent, and then merge all other group to it in one **disjoint set**.



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