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.