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

NULL is not handled correctly in join

    XMLWordPrintableJSON

Details

    Description

      With the following data in table input4_cb:

      Key Value
      ------ --------
      NULL 325
      18 NULL

      The following query:

      select * from input4_cb a join input4_cb b on a.key = b.value;
      

      returns the following result:

      NULL 325 18 NULL

      The correct result should be empty set.

      When 'null' is replaced by '' it works.

      Attachments

        1. join_nulls.q.out
          27 kB
          Ning Zhang
        2. patch-741.txt
          7 kB
          Amareshwari Sriramadasu
        3. patch-741-1.txt
          27 kB
          Amareshwari Sriramadasu
        4. patch-741-2.txt
          32 kB
          Amareshwari Sriramadasu
        5. patch-741-3.txt
          39 kB
          Amareshwari Sriramadasu
        6. patch-741-4.txt
          40 kB
          Amareshwari Sriramadasu
        7. patch-741-5.txt
          40 kB
          Amareshwari Sriramadasu
        8. patch-741-6.txt
          42 kB
          Amareshwari Sriramadasu
        9. smbjoin_nulls.q.txt
          0.6 kB
          Amareshwari Sriramadasu

        Issue Links

          Activity

            People

              amareshwari Amareshwari Sriramadasu
              nzhang Ning Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: