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

NULL values produced by left outer join do not behave as NULL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1, 2.2.0
    • 1.3.0, 2.1.1, 2.2.0
    • Query Processor
    • None

    Description

      Consider the following setup:

      create table tbl (n bigint, t string); 
      
      insert into tbl values (1, 'one'); 
      insert into tbl values(2, 'two');
      
      select a.n, a.t, isnull(b.n), isnull(b.t) from (select * from tbl where n = 1) a  left outer join  (select * from tbl where 1 = 2) b on a.n = b.n;
      
      1    one    false    true
      

      The query should return true for isnull(b.n).

      I've tested by inserting a row with null value for the bigint column into tbl, and isnull returns true in that case.

      Attachments

        1. HIVE-14027.01.patch
          4 kB
          Jesus Camacho Rodriguez
        2. HIVE-14027.02.patch
          8 kB
          Jesus Camacho Rodriguez
        3. HIVE-14027.03.patch
          9 kB
          Jesus Camacho Rodriguez
        4. HIVE-14027.patch
          4 kB
          Jesus Camacho Rodriguez

        Issue Links

          Activity

            People

              jcamachorodriguez Jesus Camacho Rodriguez
              vgumashta Vaibhav Gumashta
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: