You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/01/21 06:19:24 UTC

[GitHub] [calcite] vlsi commented on a change in pull request #1772: [CALCITE-3744] Duplicate rule matches when RelSet gets merged

vlsi commented on a change in pull request #1772: [CALCITE-3744] Duplicate rule matches when RelSet gets merged
URL: https://github.com/apache/calcite/pull/1772#discussion_r368827225
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/volcano/RuleQueue.java
 ##########
 @@ -494,11 +494,10 @@ VolcanoRuleMatch popMatch(VolcanoPlannerPhase phase) {
       }
     }
 
-    // A rule match's digest is composed of the operand RelNodes' digests,
-    // which may have changed if sets have merged since the rule match was
-    // enqueued.
-    match.recomputeDigest();
-
+    // If sets have merged since the rule match was enqueued, the match
+    // may not be removed from the matchMap because the subset may have
+    // changed, it is OK to leave it since the matchMap will be cleared
+    // at the end.
     phaseMatchList.matchMap.remove(
 
 Review comment:
   Can we remove the relevant entry when subsets are merged/removed?
   Otherwise, it looks like a memory leak.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services