Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-12899 Bring query optimization time down
  3. HIVE-13942

Correctness of CASE folding in the presence of NULL values

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.2.0
    • Fix Version/s: 2.1.0
    • Component/s: CBO
    • Labels:
      None

      Description

      Introduced in HIVE-13068.

      (case when key<'90' then 2 else 4 end) > 3 should not fold to key >= '90', as these two expressions are not equivalent (consider null values). Instead, it should fold to not NVL((key < '90'),false).

      This is caused by 1) some methods still calling original RexUtil.simplify method where the bug was originally present, and 2) further improvements needed in HiveRexUtil.simplify.

        Attachments

        1. HIVE-13942.patch
          17 kB
          Jesus Camacho Rodriguez
        2. HIVE-13942.01.patch
          18 kB
          Jesus Camacho Rodriguez

          Issue Links

            Activity

              People

              • Assignee:
                jcamachorodriguez Jesus Camacho Rodriguez
                Reporter:
                jcamachorodriguez Jesus Camacho Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: