[ https://issues.apache.org/jira/browse/HIVE-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14155869#comment-14155869 ]
Jason Dere commented on HIVE-2573: ---------------------------------- Nice! Is there an updated RB entry for this? A few comments so far: FunctionRegistry.java: * registerTemporaryUDF()/registerTemporaryGenericUDF()/registerTemporaryGenericUDTF()/etc: Is it now possible to remove these? * getFunctionInfo(): This changes the order in which unqualified function names are resolved: ** Before: *** Temp/system functions looked up first (without qualified name) *** Function name qualified with DB name, looked up in metastore ** With patch: *** Temp functions looked up first (without qualified name) *** Function name qualified with DB name, looked up in metastore *** System functions looked up (without qualified name) *** Function name qualified with DB name, looked up in metastore a 2nd time ** This also means that built-in functions end up requiring a failed metastore lookup due to checking the SessionState Registry first, and in worst case a non-existent function requires 2 separate lookups to the metastore. I think it should be possible to get behavior similar to the old behavior, if you move most of the logic back to FunctionRegistry.getFunctionInfo() and if Registry is able to lookup functions with/without looking in the metastore. FunctionTask.java: * dropTemporaryFunction(): Should this use FunctionRegistry.unregisterTemporaryUDF()? Registry.java: * LOG is using FunctionRegistry.class; should use Registry.class > Create per-session function registry > ------------------------------------- > > Key: HIVE-2573 > URL: https://issues.apache.org/jira/browse/HIVE-2573 > Project: Hive > Issue Type: Improvement > Components: Server Infrastructure > Reporter: Navis > Assignee: Jason Dere > Priority: Minor > Attachments: ASF.LICENSE.NOT.GRANTED--HIVE-2573.D3231.1.patch, > HIVE-2573.1.patch.txt, HIVE-2573.2.patch.txt, HIVE-2573.3.patch.txt, > HIVE-2573.4.patch.txt > > > Currently the function registry is shared resource and could be overrided by > other users when using HiveServer. If per-session function registry is > provided, this situation could be prevented. -- This message was sent by Atlassian JIRA (v6.3.4#6332)