[ https://issues.apache.org/jira/browse/CALCITE-2589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675091#comment-16675091 ]
zhen wang commented on CALCITE-2589: ------------------------------------ [~julianhyde] I also mentioned set importance to zero before when looking at 2223, I should have asked earlier. the idea originally came up when I saw some other RULEs adopting it `set importance to zero` and it makes sense to me. like two Filter Relnodes sits besides each other, I can't imagine why we can't combine them to make them one, is there better plans for the two filter Nodes ? > VolcanoPlanner#fireRules and VolcanoRuleCall#matchRecurse should ignore > known-to-be-unimportant relations > --------------------------------------------------------------------------------------------------------- > > Key: CALCITE-2589 > URL: https://issues.apache.org/jira/browse/CALCITE-2589 > Project: Calcite > Issue Type: Improvement > Components: core > Affects Versions: 1.17.0 > Reporter: Vladimir Sitnikov > Assignee: Julian Hyde > Priority: Major > > {{call.getPlanner().setImportance}} is used to avoid use of > known-to-be-inefficient relation, however the check of importance is > performed very late. > The check is performed in org.apache.calcite.plan.volcano.RuleQueue#skipMatch > when ruleCalls have already been created. > I suggest to move the check into VolcanoPlanner#fireRules and > VolcanoRuleCall#matchRecurse > It would reduce amount of "possible" rule executions. > Note: calling setImportance BEFORE transformTo would would help as well to > filter out unimportant rule calls early. -- This message was sent by Atlassian JIRA (v7.6.3#76005)