The Hive wiki page has it: 
http://wiki.apache.org/hadoop/Hive/AdminManual/Plugins 
  and 
http://wiki.apache.org/hadoop/Hive/DeveloperGuide#UDFs_and_UDAFs_-_how_to_add_new_UDFs_and_UDAFs

BTW, if you are trying to count the number  of rows whose  
col1="value1" and col2="value2", you don't need a UDF/UDAF.

select count(1) from T where col1="value1" and col2="value2";

will do.

Ning

On Oct 13, 2009, at 4:11 AM, Ryan LeCompte wrote:

> Hello all,
>
> I haven't seen any documentation for this, but can anyone point me  
> in the right direction on how to create my own user-defined functions?
>
> Is it possible to create a user-defined function for something like  
> this:
>
> sum(if(col1='value1' and col2='value2',1,0))
>
> Thanks,
> Ryan
>
>
>

Reply via email to