hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-45) Hive: UDFTemplate and support of complex object
Date Thu, 11 Dec 2008 07:11:44 GMT

    [ https://issues.apache.org/jira/browse/HIVE-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655547#action_12655547
] 

Zheng Shao commented on HIVE-45:
--------------------------------


{code}
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;

}
{code}


> Hive: UDFTemplate and support of complex object
> -----------------------------------------------
>
>                 Key: HIVE-45
>                 URL: https://issues.apache.org/jira/browse/HIVE-45
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>
> We should allow users to define UDF template (in the sense of c++ template that can take
args of different types), and let UDF take complex objects.
> This should be pretty simple given that we have the ObjectInspector which can navigate
through the internal structure of the object.

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


Mime
View raw message