----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46701/#review133803 -----------------------------------------------------------
Mostly looks good to me. I've flagged a few issues that should be fixed. Otherwise it looks good. Tests passed after some code edits. datafu-pig/src/main/java/datafu/pig/bags/CountDistinctUpTo.java (line 41) <https://reviews.apache.org/r/46701/#comment198464> It would be good to add a comment advising when this UDF is useful compared to using the builtin DISTINCT and COUNT based on your comments in JIRA. datafu-pig/src/main/java/datafu/pig/bags/CountDistinctUpTo.java (line 109) <https://reviews.apache.org/r/46701/#comment198426> Don't think we should be suppressing exceptions like this because it means an error can lead to incorrect results without the user knowing. datafu-pig/src/main/java/datafu/pig/bags/CountDistinctUpTo.java (line 147) <https://reviews.apache.org/r/46701/#comment198429> What about clearing the set so we don't have to garbage collect? datafu-pig/src/main/java/datafu/pig/bags/CountDistinctUpTo.java (line 152) <https://reviews.apache.org/r/46701/#comment198462> nit: I don't think there's a case where set it null datafu-pig/src/test/java/datafu/test/pig/bags/BagTests.java (line 22) <https://reviews.apache.org/r/46701/#comment198463> We already have the testng assertEquals and this gives me a build error. Can you confirm this command passes? ./gradlew :datafu-pig:test -Dtest.single=BagTests I'm getting an error with this. datafu-pig/src/test/java/datafu/test/pig/bags/BagTests.java (line 1080) <https://reviews.apache.org/r/46701/#comment198465> Why are you using the Assert.assertEquals instead of the testng assert? - Matthew Hayes On April 27, 2016, 7:44 a.m., Eyal Allweil wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46701/ > ----------------------------------------------------------- > > (Updated April 27, 2016, 7:44 a.m.) > > > Review request for DataFu. > > > Repository: datafu > > > Description > ------- > > DATAFU-117 - New UDF - CountDistinctUpTo > > > Diffs > ----- > > datafu-pig/src/main/java/datafu/pig/bags/CountDistinctUpTo.java > PRE-CREATION > datafu-pig/src/test/java/datafu/test/pig/bags/BagTests.java > 28292db0c01a1967ea53d9cc3d316e9906d942a8 > > Diff: https://reviews.apache.org/r/46701/diff/ > > > Testing > ------- > > > Thanks, > > Eyal Allweil > >