On Wed, Jan 19, 2011 at 2:37 AM, Guy Doulberg <guy.doulb...@conduit.com> wrote:
> Hey All again,
>
>
>
> I bet I am not the first one to ask this question, but I could not find an
> answer anywhere.
>
>
>
> I am using the following temporary function:
>
> CREATE TEMPORARY FUNCTION jeval AS 'org.apache.hadoop.hive.ql.udf.UDFJson';
>
>
>
> In order to use it, I need to write the above answer each time I am
> activating the hive shell.
>
>
>
> Is there a way to make this function permanent, and by doing that , I
> wouldn't need to declare about the function before I use it?
>
>
>
>
>
> Thanks again.
>
>
>
>

The only way to make a UDF permanent is to patch it into hive
o.a.h.h.ql.FunctionRegistry. (This is straight forward but who wants
to branch for some UDFS) There are some subtle issues with allowing
users to create permanent functions. For example what if this UDF
depends on 12 jars? Where are they kept? How are they loaded into the
distributed cache before use?

You have the option now to run HQL by creating a hiverc file
https://issues.apache.org/jira/browse/HIVE-1414. This is almost a
permanent function.

Reply via email to