Re: UDAF documentation

2011-03-12 Thread Aurora Skarra-Gallagher
my Palm Pre > > ____ > On Mar 11, 2011 7:01 PM, Aurora Skarra-Gallagher wrote: > > I'll just keep responding to myself. ;) > > I ended up figuring out how to do it. I just used junit and called init, > iterate, terminatePartial, etc f

Re: UDAF documentation

2011-03-11 Thread Aurora Skarra-Gallagher
a new UDAF object for each instance. For example, in my example below, there would be three separate UDAF instances. -Aurora On Mar 11, 2011, at 5:02 PM, Aurora Skarra-Gallagher wrote: > I'm looking for something like this, but for a UDAF instead of a UDF: > http://svn.apache.or

Re: UDAF documentation

2011-03-11 Thread Aurora Skarra-Gallagher
I'm looking for something like this, but for a UDAF instead of a UDF: http://svn.apache.org/repos/asf/hive/branches/branch-0.7/ql/src/test/org/apache/hadoop/hive/ql/udf/TestUDFDateDiff.java -Aurora On Mar 11, 2011, at 4:44 PM, Aurora Skarra-Gallagher wrote: > Hi, > > Did you

Re: In UDAF, possible for terminatePartial to be called without init?

2011-03-11 Thread Aurora Skarra-Gallagher
Anyone know the answer to this? Thanks, Aurora On Feb 15, 2011, at 8:53 AM, Aurora Skarra-Gallagher wrote: > Hi, > > I wrote a simple UDAF for Hive 0.6 and I had to include null checks in > terminatePartial even though the object should never be null if init is > alway

Re: UDAF documentation

2011-03-11 Thread Aurora Skarra-Gallagher
y. > > Pat > > -Original Message- > From: Aurora Skarra-Gallagher [mailto:aur...@yahoo-inc.com] > Sent: Friday, March 11, 2011 3:40 PM > To: user@hive.apache.org > Cc: Steven Wong > Subject: Re: UDAF documentation > > Hadoop: The Definitive Guide has a go

Re: UDAF documentation

2011-03-11 Thread Aurora Skarra-Gallagher
Hadoop: The Definitive Guide has a good section on this. Chapter 12: Hive: User Defined Functions. It has a diagram that shows how things are called and when. The example I'm looking at shows this sequence: (first instance) init() iterate(1) iterate(2) iterate(3) terminatePartial() (second inst

Unit testing UDAFs

2011-03-11 Thread Aurora Skarra-Gallagher
Hi, Does anyone have experience/examples on unit testing UDAFs? I'm thinking I need to test by calling some sequence like: init, iterate, iterate ..., terminatePartial, init, merge, terminate. I'm not sure though. Any advice would be appreciated. Thanks! Thanks, Aurora

Specifying a double precision in HiveQL

2011-02-24 Thread Aurora Skarra-Gallagher
Hi, I have a Hive query that has a statement like this "(sum(itemcount) / count(item))". I want to specify only two digits of precision (i.e. 53.55). The result is stored inside of a string, not its own column, so I'd need to set the precision in the statement. Is this possible? Thanks, Aurora

LazySimpleSerDe: last column takes rest

2011-02-16 Thread Aurora Skarra-Gallagher
Hi, What does setting the "serialization.last.column.takes.rest" SERDEPROPERTIES do for the LazySimpleSerDe? http://hive.apache.org/docs/r0.6.0/api/org/apache/hadoop/hive/serde2/lazy/LazySimpleSerDe.SerDeParameters.html#isLastColumnTakesRest() I came across that in considering a blob table (h

In UDAF, possible for terminatePartial to be called without init?

2011-02-15 Thread Aurora Skarra-Gallagher
Hi, I wrote a simple UDAF for Hive 0.6 and I had to include null checks in terminatePartial even though the object should never be null if init is always called before terminatePartial. For instance, my init function: public void init() { result = new StringBuffer();