Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> Re: Re: can i define an udf which can process more than one argument?


+
Chris Gong 2012-10-19, 06:11
+
Chris Gong 2012-10-19, 03:36
Copy link to this message
-
Re: can i define an udf which can process more than one argument?
UDF can process multiple arguments. You just want to define the function
signature in that way.

For example,

evaluate(String s1, String s2, boolean t)
On Thu, Oct 18, 2012 at 11:36 PM, Chris Gong <[EMAIL PROTECTED]> wrote:

> **
> i find that UDF can only process one argument like
>    public long evaluate(String ip) {
>
>   }
>
> can i define a udf like  COALESCE(T v1, T v2, …) or  if(boolean
> testCondition, T valueTrue, T valueFalseOrNull)?
>
> ------------------------------
> Chris Gong
>

--
Chen Song
+
Jan Dolinár 2012-10-19, 05:17