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

RelOptUtil.splitJoinCondition incorrectly splits a join condition

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      For a RelNode such as the following:

      LogicalJoin(condition=[<>(CAST($0):INTEGER NOT NULL, $9)], joinType=[inner]): rowcount = 1.0, cumulative cost = 1.0, id = 7
          LogicalTableScan(table=[[CATALOG, SALES, EMP]]): rowcount = 1.0, cumulative cost = 0.0, id = 5
          LogicalTableScan(table=[[CATALOG, SALES, DEPT]]): rowcount = 1.0, cumulative cost = 0.0, id = 6
      

      If RelOptUtil.splitJoinCondition is fed with this RelNode, the output will be:
      1. Remaining Condition: true (i.e., no remaining condition)
      2. LeftJoinKey: List of (<>(CAST($0):INTEGER NOT NULL, $0), true)
      3. RightJoinKey: Empty List
      (Note the index in the $ which is marked in red)

      However, isn't the expected output supposed to be ?
      1. Remaining Condition: <>(CAST($0):INTEGER NOT NULL, $9)
      2. LeftJoinKey: Empty List
      3. RightJoinKey: Empty List

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                seanhychu Sean Hsuan-Yi Chu
                Reporter:
                seanhychu Sean Hsuan-Yi Chu
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: