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

LoptOptimizeJoinRule should be able to delegate costs to the planner

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.38.0
    • 1.39.0
    • core

    Description

      LoptOptimizeJoinRule uses costs comparisons to recursively decide whether to add a join at the top of the joins tree or to push it down.

      When doing so, instead of directly calling mq.getCumulativeCost(rel), it should rely on call.getPlanner.getCost(rel, mq), which will be used thereafter to choose the best joins tree.

      This way, it becomes possible to customize the costs computation during the heuristic joins ordering phase by just overriding the getCost() method of the optimization planner.

      Without this patch, it is only possible to alter joins costs at the final phase of the algorithm, which defeats the goal of customizing them, including during the to-top/push-down phase.

      Attachments

        Issue Links

          Activity

            People

              rubenql Ruben Q L
              cbrisson Claude Brisson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: