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

Enrich enumerable join operators with order preserving information

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.17.0
    • Fix Version/s: 1.19.0
    • Component/s: core

      Description

      Calcite enumerable convention offers four ways to perform a join over two inputs:

      1. EnumerableJoin
      2. EnumerableThetaJoin
      3. EnumerableSemiJoin
      4. EnumerableCorrelate

      The algorithms that are used by the afforementioned operators :

      1. org.apache.calcite.linq4j.EnumerableDefaults#join_
      2. org.apache.calcite.linq4j.EnumerableDefaults#thetaJoin
      3. org.apache.calcite.linq4j.EnumerableDefaults#semiJoin
      4. org.apache.calcite.linq4j.EnumerableDefaults#correlateJoin

      in many cases can preserves the order of the left (outer) input. However, this information is not reflected in the RelTraitSet and thus cannot be exploited by the optimizer. Without this information, sort operators following the join cannot be removed (using SortRemoveRule) leading to suboptimal plans.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mmior Michael Mior
                Reporter:
                zabetak Stamatis Zampetakis
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: