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

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

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

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

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              pxiong Pengcheng Xiong Assign to me
              Reporter:
              pxiong Pengcheng Xiong

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment