mihaibudiu commented on code in PR #4795:
URL: https://github.com/apache/calcite/pull/4795#discussion_r2809800413


##########
core/src/main/java/org/apache/calcite/plan/hep/HepPlanner.java:
##########
@@ -114,6 +117,18 @@ public class HepPlanner extends AbstractRelOptPlanner {
   private final List<RelOptMaterialization> materializations =
       new ArrayList<>();
 
+  /**
+   * Cache for fired rules for by fixed operands and rule.
+   */
+  private final Multimap<List<Integer>, RelOptRule> fireRuleCache = 
HashMultimap.create();

Review Comment:
   Please describe more clearly what the integers in the list represent.



##########
core/src/main/java/org/apache/calcite/plan/hep/HepPlanner.java:
##########
@@ -114,6 +117,18 @@ public class HepPlanner extends AbstractRelOptPlanner {
   private final List<RelOptMaterialization> materializations =
       new ArrayList<>();
 
+  /**
+   * Cache for fired rules for by fixed operands and rule.
+   */
+  private final Multimap<List<Integer>, RelOptRule> fireRuleCache = 
HashMultimap.create();
+
+  /**
+   * Track the RelNode ID to multiple RelNode IDs in fireRuleCache for GC.
+   */
+  private final Multimap<Integer, List<Integer>> fireRuleCacheIndex = 
HashMultimap.create();

Review Comment:
   Same here: what are the keys and values in this map representing?



##########
core/src/main/java/org/apache/calcite/plan/hep/HepPlanner.java:
##########
@@ -173,6 +188,8 @@ public HepPlanner(
       removeRule(rule);
     }
     this.materializations.clear();
+    this.fireRuleCache.clear();

Review Comment:
   "fire" is not the same as "firing".
   I would replace "fire" with "firing" or perhaps even "firingRules"



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to