HI Saurabh, Hive supports both UDF and GenericUDF.
UDF are much easier to write, but it is currently limited to work with primitive types (including String). GenericUDF supports advanced features including complex type parameters/return values, short-circuit computation, complete object reuse (no need to create a single new object for each call) etc. Some of these features are not currently provided in other systems yet, so GenericUDF looks more complicated. I guess you just a normal UDF for now. Please take a look at UDF*.java. Those are very easy to understand and write. Zheng On Wed, Jul 15, 2009 at 5:20 AM, Saurabh Nanda<[email protected]> wrote: > >>> 0.3 is quite old. You should look at trunk >>> http://svn.apache.org/repos/asf/hadoop/hive. We are going to create a 0.4 >>> branch soon. > > http://svn.apache.org/repos/asf/hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTestTranslate.java > looks so intimidating! Also, this is not exactly a UDF that returns multiple > values, is it? > > Have you compared this with the approach Cloudbase is taking to UDFs? It's a > breeze. Why is Hive putting so much of complexity into this? > > Saurabh. > -- > http://nandz.blogspot.com > http://foodieforlife.blogspot.com > -- Yours, Zheng
