[
https://issues.apache.org/jira/browse/HIVE-7588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14136227#comment-14136227
]
Jason Dere commented on HIVE-7588:
----------------------------------
The one question I have here is, should we allow this or would we be better off
pushing users to use GenericUDF in this case?
> 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
> Attachments: HIVE-7588.1.patch.txt, HIVE-7588.2.patch.txt,
> HIVE-7588.3.patch.txt, HIVE-7588.4.patch.txt
>
>
> From http://www.mail-archive.com/[email protected]/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.3.4#6332)