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

FilterIntoJoinRule creates filters containing invalid RexInputRef

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.2-incubating
    • 1.0.0-incubating
    • None
    • None

    Description

      Filter should be allowed to be constructed even when types are INTEGER && INTEGER NOT NULL respectively. Currently, it fails with :

       java.lang.AssertionError: type mismatch:
      type1:
      INTEGER NOT NULL
      type2:
      INTEGER
      	at org.eigenbase.relopt.RelOptUtil.eq(RelOptUtil.java:1566)
      	at org.eigenbase.rex.RexProgramBuilder$RegisterInputShuttle.visitInputRef(RexProgramBuilder.java:899)
      	at org.eigenbase.rex.RexProgramBuilder$RegisterInputShuttle.visitInputRef(RexProgramBuilder.java:878)
      	at org.eigenbase.rex.RexInputRef.accept(RexInputRef.java:102)
      	at org.eigenbase.rex.RexShuttle.visitList(RexShuttle.java:129)
      	at org.eigenbase.rex.RexShuttle.visitCall(RexShuttle.java:78)
      	at org.eigenbase.rex.RexProgramBuilder$RegisterShuttle.visitCall(RexProgramBuilder.java:843)
      	at org.eigenbase.rex.RexProgramBuilder$RegisterShuttle.visitCall(RexProgramBuilder.java:841)
      	at org.eigenbase.rex.RexCall.accept(RexCall.java:105)
      	at org.eigenbase.rex.RexProgramBuilder.registerInput(RexProgramBuilder.java:272)
      	at org.eigenbase.rex.RexProgramBuilder.addCondition(RexProgramBuilder.java:247)
      	at org.eigenbase.relopt.RelOptUtil.pushFilterPastProject(RelOptUtil.java:2367)
      	at org.eigenbase.rel.rules.PushFilterPastProjectRule.onMatch(PushFilterPastProjectRule.java:80)
      	at org.eigenbase.relopt.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:321)
      	at org.eigenbase.relopt.hep.HepPlanner.applyRule(HepPlanner.java:488)
      	at org.eigenbase.relopt.hep.HepPlanner.applyRules(HepPlanner.java:365)
      	at org.eigenbase.relopt.hep.HepPlanner.executeInstruction(HepPlanner.java:258)
      	at org.eigenbase.relopt.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:68)
      	at org.eigenbase.relopt.hep.HepPlanner.executeProgram(HepPlanner.java:179)
      	at org.eigenbase.relopt.hep.HepPlanner.findBestExp(HepPlanner.java:166)
      

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              ashutoshc Ashutosh Chauhan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: