You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Navis (JIRA)" <ji...@apache.org> on 2014/08/01 03:19:39 UTC
[jira] [Created] (HIVE-7588) Using type variable in UDF
Navis created HIVE-7588:
---------------------------
Summary: Using type variable in UDF
Key: HIVE-7588
URL: https://issues.apache.org/jira/browse/HIVE-7588
Project: Hive
Issue Type: Improvement
Components: UDF
Reporter: Navis
Assignee: Navis
Priority: Trivial
>From http://www.mail-archive.com/user@hive.apache.org/msg12307.html
Support type variables in UDF
{code}
public <T> T evaluate(final T s, final String column_name, final int bitmap) throws Exception {
if (s instanceof Double)
return (T) new Double(-1.0);
Else if( s instance of Integer)
Return (T) new Integer(-1) ;
…..
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)