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/03/12 03:35:36 UTC
[GitHub] [calcite] liyafan82 commented on a change in pull request #1853:
[CALCITE-3851] Store nodes with zero importance with a set
liyafan82 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_r391384985
##########
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:
Removed. Thanks for the good suggestion.
----------------------------------------------------------------
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