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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.17.0
    • Fix Version/s: 1.18.0
    • Component/s: core
    • Labels:

      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

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                vladimirsitnikov Vladimir Sitnikov
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: