The problem might be Java's limitation on having a single top-level class
in each file (as opposed to classes nested within a top-level class). You
would have to nest your UDFs in such a top-level class. That would work
fine, but when you define a TEMPORARY FUNCTION in Hive, I don't know if the
syntax supports references nested UDFs within a class. Perhaps someone else
can comment, or you could do the experiment yourself and see ;) If it
doesn't work, you'll just refactor the code into separate files.

Actually, since you should build a jar with your UDFs anyway, it's probably
doesn't matter a lot how many files you have, other than the slight
inconvenience of managing more than one.

dean

On Tue, Jul 9, 2013 at 7:49 AM, Manickam P <manicka...@outlook.com> wrote:

> Hi,
>
> Can we write more than one function like to_upper and to_lower in same UDF
> ? Or do we need write separate UDF for each?
> Please let me know.
>
>
>
> Thanks,
> Manickam P
>



-- 
Dean Wampler, Ph.D.
@deanwampler
http://polyglotprogramming.com

Reply via email to