Thanks a lot for the great tutorial about UDF and UDAF, they are awesome and extremely helpful!
But I got a little confused by TotalNumOfLettersGenericUDAF.TotalNumOfLettersEvaluator.reset function
Original it is, looks like nothing did here:
public void reset(AggregationBuffer agg) throws HiveException {
LetterSumAgg myagg = new LetterSumAgg();
}
In my view it should look like this:
public void reset(AggregationBuffer agg) throws HiveException {
((LetterSumAgg)agg).sum = 0;
}
Maybe I'm wrong, if so can you tell me what did the reset function should do here,