hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <>
Subject [jira] Issue Comment Edited: (HIVE-45) Hive: GenericUDF and support of complex object
Date Tue, 05 May 2009 01:17:30 GMT


Zheng Shao edited comment on HIVE-45 at 5/4/09 6:15 PM:

Please see HIVE-164 for the interface of GenericUDF.

      was (Author: zshao):
public abstract class UDFTemplate {

   * Evaluate the template function given the parameters row and rowInspector. 
   * NOTE: If the ObjectInspectors of the parameters do not change, then result.oi cannot
change as well.
   * @param parameters  the input parameters to the template function
   * @param result   result.o and result.oi will be set inside the method.
  public abstract void evaluate(List<InspectableObject> parameters, InspectableObject
result) throws HiveException;

   * Evaluate the result's ObjectInspector given the parameters' ObjectInspectors.
   * ObjectInspector encapsulates information about the object type and the methods to access
the internal fields inside the object.
   * @param parameterInspectors the input parameters' ObjectInspectors to the template function
   * @return null if the template function does not accept such a list of parameters; otherwise
the same 
   *     ObjectInspector as returned in result.oi in evaluate(...).
  public abstract ObjectInspector evaluateInspector(List<ObjectInspector> parameterInspectors)
throws HiveException;


> Hive: GenericUDF and support of complex object
> ----------------------------------------------
>                 Key: HIVE-45
>                 URL:
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>             Fix For: 0.4.0
> GenericUDF are more powerful than UDF in the following ways:
> 1. It can accept arguments of complex types, and return complex types.
> 2. It can accept variable length of arguments.
> 3. It can accept an infinite number of function signature - for example, it's easy to
write a GenericUDF that accepts array<int>, array<array<int>> and so on
(arbitrary levels of nesting).
> 4. It can do short-circuit evaluations. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message