On Dec 8, 2011, at 12:20 PM, Sam William wrote:
> I have a bunch of custom UDFs and I d like the others in the company to make use of then in an easy way . Im not very happy with the 'CREATE TEMPORARY FUNCTION' arrangement for each session . It d be great if our site-specific functions , work the sameway as the inbuilt functions. What options do I have other than modifying FunctionRegistry and recompiling ?
Hey Sam,
At Facebook, we use a standard Hive init script to preload the temporary functions, using the CLI's -i option:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+CliYou could also take a look at the work I recently did on loading builtins from a separate jar using Hive's PDK. If you want to work on an enhancement, it shouldn't be too hard to add a configuration option to preload additional jars and their functions using the same technique:
https://issues.apache.org/jira/browse/HIVE-2523A real SQL/J implementation of persistent functions in the metastore would be preferable, but that's a lot of work.
JVS