Re: concat_ws() UDF

2013-12-28 Thread Ritesh Agrawal
The first string in concat_ws is used as a separator. Since the third value in the last concat_ws is null, it skipped that and simply concactenated second and fourth value by **. Hence you got abc8675309 Ritesh On Fri, Dec 27, 2013 at 12:13 AM, Alexey Zotov wrote: > Sorry, but in my previo

Hive UDAF Testing using Plugin Development Kit

2013-10-31 Thread Ritesh Agrawal
Hi all, I am trying to understand how to test a custom UDAF. Looking around, I found that I can generate a simple query file and run it or use hive plugin development kit. However I am not able to get anything running as most places either the instructions are incomplete or mostly available for AN

Re: Hive UDAF extending UDAF class: iterate or evaluate method

2013-08-07 Thread Ritesh Agrawal
>>} >> >> } >> >> >> >> *Usage in a Hive script* >> * >> * >> hive -e " >> >> create temporary function toupper as >> &#

Re: Hive UDAF extending UDAF class: iterate or evaluate method

2013-08-05 Thread Ritesh Agrawal
play/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 Agrawa

Hive UDAF extending UDAF class: iterate or evaluate method

2013-08-04 Thread Ritesh Agrawal
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. Howe

Re: UDAF terminatePartial structure

2013-07-29 Thread Ritesh Agrawal
a example helpful: > http://grepcode.com/file/repository.cloudera.com/content/repositories/releases/org.apache.hadoop.hive/hive-contrib/0.7.0-cdh3u0/org/apache/hadoop/hive/contrib/udaf/example/UDAFExampleMaxMinNUtil.java#UDAFExampleMaxMinNUtil.Evaluator > > igor > decide.com > > &

Re: UDAF terminatePartial structure

2013-07-29 Thread Ritesh Agrawal
artial to the > merge functions. But it seems a bit of overkill. > > Why not define a class within your UDAF which has 4 public data members, > and return instances of that class from terminatePartial()? > > Robin > > > On 7/29/13 3:19 PM, "Ritesh Agrawal" wrot

UDAF terminatePartial structure

2013-07-29 Thread Ritesh Agrawal
Hi all, I am writing my first UDAF. In my terminatePartial() function, I need to store different data having different data types. Below is a list of items that I need to store 1. C1 : list of doubles 2. C2: list of doubles 3. C3: double 4. Show: list of strings I am wondering can I use simple