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

COLLECT_SET and COLLECT_LIST does not return NULL in the result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 2.1.1
    • None
    • None
    • None

    Description

      See the test case below:

      0: jdbc:hive2://localhost:10000/default> select * from collect_set_test;
      +---------------------+
      | collect_set_test.a  |
      +---------------------+
      | 1                   |
      | 2                   |
      | NULL                |
      | 4                   |
      | NULL                |
      +---------------------+
      
      0: jdbc:hive2://localhost:10000/default> select collect_set(a) from collect_set_test;
      +---------------+
      |      _c0      |
      +---------------+
      | [1,2,4]  |
      +---------------+
      
      

      The correct result should be:

      0: jdbc:hive2://localhost:10000/default> select collect_set(a) from collect_set_test;
      +---------------+
      |      _c0      |
      +---------------+
      | [1,2,null,4]  |
      +---------------+
      

      Attachments

        1. HIVE-16029.2.patch
          6 kB
          Eric Lin
        2. HIVE-16029.3.patch
          13 kB
          Eric Lin
        3. HIVE-16029.patch
          0.8 kB
          Eric Lin

        Activity

          People

            ericlin Eric Lin
            ericlin Eric Lin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: