Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-13545

JoinToMultiJoinRule should not match SEMI/ANTI LogicalJoin

    XMLWordPrintableJSON

    Details

      Description

      run tpcds 14.a on blink planner, an exception will thrown

      java.lang.ArrayIndexOutOfBoundsException: 84

      at org.apache.calcite.rel.rules.JoinToMultiJoinRule$InputReferenceCounter.visitInputRef(JoinToMultiJoinRule.java:564)
      at org.apache.calcite.rel.rules.JoinToMultiJoinRule$InputReferenceCounter.visitInputRef(JoinToMultiJoinRule.java:555)
      at org.apache.calcite.rex.RexInputRef.accept(RexInputRef.java:112)
      at org.apache.calcite.rex.RexVisitorImpl.visitCall(RexVisitorImpl.java:80)
      at org.apache.calcite.rex.RexCall.accept(RexCall.java:191)
      at org.apache.calcite.rel.rules.JoinToMultiJoinRule.addOnJoinFieldRefCounts(JoinToMultiJoinRule.java:481)
      at org.apache.calcite.rel.rules.JoinToMultiJoinRule.onMatch(JoinToMultiJoinRule.java:166)
      at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:319)
      at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:560)
      at org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:419)
      at org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:284)
      at org.apache.calcite.plan.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:74)
      at org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:215)
      at org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:202)

      the reason is JoinToMultiJoinRule should match SEMI/ANTI LogicalJoin. before calcite-1.20, SEMI join is represented by SemiJoin which is not matched JoinToMultiJoinRule.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                godfreyhe godfrey he
                Reporter:
                godfreyhe godfrey he
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 20m
                  20m