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

Correlated subquery producing wrong schema

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Repro

      create table test(id int, name string,dept string);
      insert into test values(1,'a','it'),(2,'b','eee'),(NULL, 'c', 'cse');
      select distinct 'empno' as eid, a.id from test a where NOT EXISTS (select c.id from test c where a.id=c.id);
      
      +-------+--------+
      |  eid  |  a.id  |
      +-------+--------+
      | NULL  | empno  |
      +-------+--------+
      

      Attachments

        1. HIVE-22107.5.patch
          301 kB
          Vineet Garg
        2. HIVE-22107.4.patch
          295 kB
          Vineet Garg
        3. HIVE-22107.3.patch
          291 kB
          Vineet Garg
        4. HIVE-22107.2.patch
          288 kB
          Vineet Garg
        5. HIVE-22107.1.patch
          13 kB
          Vineet Garg

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            vgarg Vineet Garg Assign to me
            vgarg Vineet Garg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 20m
              20m

              Slack

                Issue deployment