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

JoinConditionPushRule cannot infer 'LHS.C1 = LHS.C2' from 'LHS.C1 = RHS.C1 AND LHS.C2 = RHS.C1'

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.30.0
    • 1.31.0
    • core

    Description

      For the below SQL:

      SELECT * FROM T1, T2, T3
      WHERE T1.id = T3.id AND T2.id = T3.id

      Currently, JoinConditionPushRule cannot infer the condition 'T1.id = T2.id' for the first join relation.

      There is another rule JoinPushThroughJoinRule, it can handle the above case in a different way (by reordering joins).

      This can be a more general optimization, which like the title says, we can infer more conditions from join condition (or above filter condition) to the Join's operands.

      It's reported in ML: https://lists.apache.org/thread/6fs09cgyz5rzrty90632ywoo477q0gdk

      Attachments

        Issue Links

          Activity

            People

              libenchao Benchao Li
              libenchao Benchao Li
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 10m
                  3h 10m