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

RexSimplify optimization error for expression 'x is not null and x <> 5'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 1.16.0
    • 1.17.0
    • core
    • None

    Description

         After the optimization of RexSimplify,the expression 'x is not null and x <> 5' (x is nullable) is optimized to 'x<> 5' (RexSimplify#unknownAsFalse is true).  I think it is not a correct result because when x is null, null<> 5 should return true,while 'x is not null and x <> 5' return false.

        I think the optimization for "is not null" in RexSimplify#simplifyAnd2ForUnknownAsFalse should exclude the case of not-equal operator.

       I really confused with this optimization, can you give some suggestion,thanks! 

       

        

               

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            pzw2018 pengzhiwei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: