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

Simplify (c IS NULL) OR (c IS ...) might result in AssertionError: result mismatch

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.17.0
    • 1.18.0
    • core

    Description

          checkSimplify2(
              //OR(<=(?0.int0, null), IS NULL(?0.bool0), IS NOT FALSE(?0.bool0))
              or(le(vInt(), nullInt), isNull(vBool()), isNotFalse(vBool())),
              "...", "...");
      
      java.lang.AssertionError: result mismatch: when applied to {?0.int0=-1, ?0.bool0=true}, OR(<=(?0.int0, null), IS NULL(?0.bool0), IS NOT FALSE(?0.bool0)) yielded true, and OR(<=(?0.int0, null), IS NULL(?0.bool0)) yielded NULL
      
      	at org.apache.calcite.rex.RexSimplify.verify(RexSimplify.java:1201)
      	at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:175)
      	at org.apache.calcite.test.RexProgramTest.checkSimplify2(RexProgramTest.java:150)
      

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              vladimirsitnikov Vladimir Sitnikov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: