Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2589

VolcanoPlanner#fireRules and VolcanoRuleCall#matchRecurse should ignore known-to-be-unimportant relations

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.17.0
    • Fix Version/s: None
    • Component/s: core

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vladimirsitnikov Vladimir Sitnikov
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: