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

Add commutative join rule

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.0-incubating
    • None
    • None

    Description

      Add a rule that transforms joins according to the commutativity rule ((a join b) join c) -> (a join (b join c)).

      The rule would assume that conditions are pushed down as far as possible, and would push down conditions as far as possible. It remains TBD whether the rule would permit creation of cartesian joins.

      This rule compliments existing associativity rules for (SwapJoinRule) and exchange rules (two variants of PushJoinThroughJoinRule).

      When combined with the other rules, this will be able to find all possible join plans, including bushy plans. But it will increase the size of the search space, so we will need to be careful not to do exhaustive search for queries with more than, say, 7 joins. A heuristic/greedy algorithm will be needed for those cases.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: