----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57009/#review166717 -----------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMkCollectionEvaluator.java <https://reviews.apache.org/r/57009/#comment238735> I just checked the java. Seems java set doesn't include null. Let's ask Chao for the opinion since he worked on that fix. - Aihua Xu On Feb. 24, 2017, 1:01 a.m., Eric Lin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57009/ > ----------------------------------------------------------- > > (Updated Feb. 24, 2017, 1:01 a.m.) > > > Review request for hive and Aihua Xu. > > > 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 > ----- > > > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMkCollectionEvaluator.java > 2b5e6dd > > Diff: https://reviews.apache.org/r/57009/diff/ > > > 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 > >