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

Wrong result with NOT IN involving null values

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Logical Optimizer
    • Labels:

      Description

      Reproducer

      create table t7(i int, j int);
      create table fixOb(i int, j int);
      insert into t7 values(null, 5);
      insert into t7 values(4, 15);
      
      insert into fixOb values(-1, 5);
      insert into fixOb values(-1, 15);
      

      Query:

       select * from fixOb where j NOT IN (select i from t7 where t7.j=fixOb.j);  

      Expected Result

      i  | j  
      ----+----
       -1 | 15
      

      Actual Result

       No result 

        Attachments

          Activity

            People

            • Assignee:
              vgarg Vineet Garg
              Reporter:
              vgarg Vineet Garg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: