hsyuan commented on a change in pull request #1853: [CALCITE-3851] Store nodes 
with zero importance with a set
URL: https://github.com/apache/calcite/pull/1853#discussion_r390494901
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
 ##########
 @@ -917,13 +917,13 @@ RelNode changeTraitsUsingConverters(
   public void setImportance(RelNode rel, double importance) {
     assert rel != null;
     if (importance == 0d) {
-      relImportances.put(rel, importance);
+      nodesToSkip.add(rel);
     }
   }
 
   Double getImportance(RelNode rel) {
     assert rel != null;
-    return relImportances.get(rel);
+    return nodesToSkip.contains(rel) ? 0d : null;
   }
 
 Review comment:
   You can remove this method.

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


With regards,
Apache Git Services

Reply via email to