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

RelOptUtil#splitJoinCondition must consider RexFieldAccess referencing RexInputRef

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 1.18.0
    • Fix Version/s: None
    • Component/s: None

      Description

      RelOptUtil#splitJoinCondition "Splits out the equi-join components of a join condition, and returns what's left (remaining join filters that are not equijoins)". This works fine in case of RexInputRef operands in the condition (e.g. $0 = $1), but if any of the operands is a RexFieldAccess referencing a RexInputRef (e.g. $0 = $1.id), then the condition will NOT be detected as an equi-join and will be returned as if it were a non-equijoin.
      This can lead to undesired consequences, e.g JoinInfo#of would return a NonEquiJoinInfo object instead of an EquiJoinInfo object, which can generate problems if, for example, we are creating a SemiJoin (which requires an EquiJoinInfo object)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rubenql Ruben Q L
                Reporter:
                rubenql Ruben Q L
              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 0.5h
                  0.5h