Class MultiJoinOptimizeBushyRule


  • public class MultiJoinOptimizeBushyRule
    extends RelOptRule
    Planner rule that finds an approximately optimal ordering for join operators using a heuristic algorithm.

    It is triggered by the pattern LogicalProject (MultiJoin).

    It is similar to LoptOptimizeJoinRule. LoptOptimizeJoinRule is only capable of producing left-deep joins; this rule is capable of producing bushy joins.

    TODO:

    1. Join conditions that touch 1 factor.
    2. Join conditions that touch 3 factors.
    3. More than 1 join conditions that touch the same pair of factors, e.g. t0.c1 = t1.c1 and t1.c2 = t0.c3