I might be wrong, but it seems like it wont be useful, as there is no 'list' Hive data type. Valid complex types are listed here: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-ComplexTypes
As for complex literals, say if you want to test a udf that operate on an array, you can make one using array UDF (ie, array('a', 'b', 'c'). Hope that helps Szehon On Thu, Apr 10, 2014 at 4:06 AM, Ng, Raymond <raymond...@baesystems.com>wrote: > Hi all > > > > I'm trying to find out if its possible to pass in a List in a SELECT > statement to be used by the "evaluate" method of a UDF using > ListObjectInspector on DeferredObject array? > > > > I've followed some instructions to build a function which extends > GenericUDF (code snippet on "evaluate" method below), its completed and > unit tested, and deployed onto Hive via the ADD JAR and CREATE TEMPORARY > FUNCTION utilities. > > > > public class TestUdf extends GenericUDF > > > > private ListObjectInspector listOI; > > > > @Override > > *public* Object evaluate(*final* DeferredObject[] arguments) > *throws*HiveException { > > // get the list and string from the deferred objects using the > object inspectors > > List<String> argValList = *(List<String>) **this**.**listOI* > *.getList(arguments[1].get())*; > > .... > > > > Now I need a way to test it by running a SELECT statement like > > > > select col1, testudf(col2, List(col3,col4,col5)) from table1; > > > > is it possible? > > > > Thanks > > Raymond > Please consider the environment before printing this email. This message > should be regarded as confidential. If you have received this email in > error please notify the sender and destroy it immediately. Statements of > intent shall only become binding when confirmed in hard copy by an > authorised signatory. The contents of this email may relate to dealings > with other companies under the control of BAE Systems Applied Intelligence > Limited, details of which can be found at > http://www.baesystems.com/Businesses/index.htm. >