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

Reducing NOT() should not collapse NOT(IS_TRUE) to IS_FALSE for nullable inputs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.14.0
    • None
    • None

    Description

      In RexSimplify, when simplifying NOT(), we negate the input expression. But for IS_FALSE/IS_TRUE/IS_NOT_FALSE/IS_NOT_TRUE this cannot be just negated if the input is nullable.

      IS_FALSE(null) = false
      IS_TRUE(null) = false
      NOT(IS_FALSE(null)) = true != IS_TRUE(null)
      
      IS_NOT_FALSE(null) = true
      IS_NOT_TRUE(null) = true
      NOT(IS_NOT_FALSE(null)) = false != IS_NOT_TRUE(null)
      

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            minjikim MinJi Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: