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

NULL table comparison within CASE does not work as previous hive versions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1
    • 2.0.0
    • None
    • None

    Description

      drop table test_1;
      create table test_1 (id int, id2 int);
      insert into table test_1 values (123, NULL);
      SELECT cast(CASE WHEN id = id2 THEN FALSE ELSE TRUE END AS BOOLEAN) AS b
      FROM test_1;
      --NULL

      But the output should be true (confirmed with postgres.)

      Attachments

        1. HIVE-12742.01.patch
          3 kB
          Pengcheng Xiong
        2. HIVE-12742.02.patch
          20 kB
          Pengcheng Xiong
        3. HIVE-12742.03.patch
          28 kB
          Pengcheng Xiong

        Issue Links

          Activity

            People

              pxiong Pengcheng Xiong
              pxiong Pengcheng Xiong
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: