hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Lin <eric....@cloudera.com>
Subject Re: Review Request 57009: HIVE-16029 - COLLECT_SET and COLLECT_LIST does not return NULL in the result
Date Tue, 23 May 2017 07:14:48 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57009/
-----------------------------------------------------------

(Updated May 23, 2017, 7:14 a.m.)


Review request for hive and Aihua Xu.


Changes
-------

updated test cases that failed in the last patch.


Bugs: HIVE-16029
    https://issues.apache.org/jira/browse/HIVE-16029


Repository: hive-git


Description
-------

See the test case below:

{code}
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]  |
+---------------+

{code}

The correct result should be:

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


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectList.java 156d19b 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCollectSet.java 0c2cf90 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMkCollectionEvaluator.java
2b5e6dd 
  ql/src/test/results/clientpositive/llap/udaf_collect_set_2.q.out aa55979 
  ql/src/test/results/clientpositive/spark/udaf_collect_set.q.out ee152ca 
  ql/src/test/results/clientpositive/udaf_collect_set.q.out ee152ca 
  ql/src/test/results/clientpositive/udaf_collect_set_2.q.out f2e76a7 


Diff: https://reviews.apache.org/r/57009/diff/3/

Changes: https://reviews.apache.org/r/57009/diff/2-3/


Testing
-------

Manully tested and confirmed result is correct:

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


Thanks,

Eric Lin


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message