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

Revise codegen for EnumerableMergeJoin to accept any sort order

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core
    • None

    Description

      Given MergeJoin on foo.a=bar.a and foo.b=bar.b,
      The codegen for EnumerableMergeJoin always sort tuples by ascending order, nulls last, but after 1.23.0 calcite can generate MergeJoin on collation of (b,a), or even (a,b,c), (b,a,c), with any asc/desc, null direction, which are all legit. So the codegen should sort tuples exactly according to the requirement of collation.

      See https://github.com/apache/calcite/blob/master/linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java#L1966
      and
      https://github.com/apache/calcite/pull/1833#discussion_r384445110

      Attachments

        Issue Links

          Activity

            People

              donnyzone Feng Zhu
              hyuan Haisheng Yuan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: