Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-14619

CASE folding can produce wrong expression

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.1.0
    • 2.1.1, 2.2.0
    • CBO
    • None

    Description

      This is a case that was not covered in the testsuite. For the following query:

      select (CASE WHEN key = value THEN '1' WHEN true THEN '0' ELSE NULL END)
      from src
      

      Currently, we end up folding the select expression to '0', as we fail bail out in the second statement and fail to account that there are two different possible values for the CASE expression ('1' and '0').

      Attachments

        1. HIVE-14619.patch
          3 kB
          jcamachorodriguez

        Activity

          People

            jcamacho Jesús Camacho Rodríguez
            jcamacho Jesús Camacho Rodríguez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: