Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-16701

Calcite engine. Merge join incorrectly works when there are more then two matched rows on the right side

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Reproducer:

      executeSql("CREATE TABLE t1(i INT)");
      executeSql("CREATE INDEX t1_i ON t1(i)");
      executeSql("INSERT INTO t1 VALUES (0)");
      executeSql("CREATE TABLE t2(i INT)");
      executeSql("CREATE INDEX t2_i ON t2(i)");
      executeSql("INSERT INTO t2 VALUES (0), (0), (0)");
      assertQuery("SELECT /*+ DISABLE_RULE('CorrelatedNestedLoopJoin', 'NestedLoopJoinConverter') */ t1.i FROM t1 LEFT JOIN t2 ON t1.i = t2.i").returns(0).returns(0).returns(0).check();
      

      Should return [0, 0, 0], but returns [0, 0].

       

       

      Attachments

        Issue Links

          Activity

            People

              alex_pl Aleksey Plekhanov
              alex_pl Aleksey Plekhanov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 40m
                  40m