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

Mixed merge join result is incomplete

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.26.0
    • None
    • linq4j

    Description

      The result of mixed merge join is incomplete. The merge join relies on the row data of the two tables to be sorted by the join field, but if the left table itself is a left join, nulls may appear due to mismatches, causing the entire join to end early。

        EG:

         t1 left join t2 on t1.id=t2.id join t3 on t2.id=t3.id;

         t1 rows: 1,2,3,4

         t2 rows: 1,2,4

         t3 rows: 1.2.3.4

         final result is:1,2.  but 4 is lost;

         when MergeJoinEnumerator left (t1xt2) come to: 3,null, right (t3) is 3, the null <3 cause left  advance finish wrong

      Attachments

        Activity

          People

            Unassigned Unassigned
            qc super486
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 40m
                1h 40m