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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.14.0
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: