You might find this wikidoc useful: GenericUDAFCaseStudy<https://cwiki.apache.org/confluence/display/Hive/GenericUDAFCaseStudy> .
The O'Reilly book "Programming Hive" also has a section called "User-Defined Aggregate Functions" in chapter 13 (Functions), pages 172 to 176. -- Lefty On Sun, Aug 4, 2013 at 7:12 AM, Ritesh Agrawal <ragra...@netflix.com> wrote: > Hi all, > > I am trying to write a UDAF function. I found an example that shows how to > implement a UDAF in "Hadoop The Definitive Guide" book. However I am little > confused. In the book, the author extends UDAF class and implements init, > iterate, terminatePartial, merge and terminate function. However looking > at the hive docs ( > http://hive.apache.org/docs/r0.11.0/api/org/apache/hadoop/hive/ql/exec/UDAF.html), > it seems I need to implement init, aggregate, evaluatePartial, > aggregatePartial and evaluate function. Please let me know what are the > write functions to implement. > > Ritesh > -- Lefty