[ 
https://issues.apache.org/jira/browse/HIVE-6167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13865921#comment-13865921
 ] 

Xuefu Zhang commented on HIVE-6167:
-----------------------------------

I think a direct consequence of the proposed behavior is that user who defines 
a function (temp or perm) without qualified name will not be able to use it as 
the way the function is defined unless the current database is 'default'. Plus, 
it seems unusual that in such case that a function defines in the context of a 
database other than 'default' actually registered with another database 
('default').

I can think of two alternatives:
1. break backward compatibility so that non-qualified temp function goes to the 
current database.
2. don't qualify user defined functions (temp or perm) with database names so 
that  every user-defined function as well as built-in function is global.

I'd like to read other's thoughts as well.

> Allow user-defined functions to be qualified with database name
> ---------------------------------------------------------------
>
>                 Key: HIVE-6167
>                 URL: https://issues.apache.org/jira/browse/HIVE-6167
>             Project: Hive
>          Issue Type: Sub-task
>          Components: UDF
>            Reporter: Jason Dere
>            Assignee: Jason Dere
>
> Function names in Hive are currently unqualified and there is a single 
> namespace for all function names. This task would allow users to define 
> temporary UDFs (and eventually permanent UDFs) with a database name, such as:
> CREATE TEMPORARY FUNCTION userdb.myfunc 'myudfclass';



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to