Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6563

NOT elimination for CASE expressions is broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.10.2.0
    • 10.10.2.1, 10.11.1.1
    • SQL
    • None
    • Repro attached
    • Wrong query result

    Description

      NOT elimination for CASE expressions seems to be broken. Take this example:

      ij> select * from sysibm.sysdummy1 where not ( case when ibmreqd = 'Y' then true else true end );
      IBM&
      ----
      Y   
      
      1 row selected
      

      Both branches of the CASE expression evaluate to TRUE, so one would expect the predicate "not ( case ... )" to evaluate to FALSE, and the query should return an empty result.

      Attachments

        1. d6563-1a.diff
          9 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: