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

pavithra ramachandran commented on SPARK-28672:
-----------------------------------------------

[~abhishek.akg] -  When we execute show function- it is displaying the 
temporary and permanent function that is created, since no database is 
mentioned while creating the permanent it is stored as default.addm3, Temporary 
functions are not specific to any database, So it is displayed without any db 
name. I dont think that is an issue

> [UDF] Duplicate function creation should not allow 
> ---------------------------------------------------
>
>                 Key: SPARK-28672
>                 URL: https://issues.apache.org/jira/browse/SPARK-28672
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: ABHISHEK KUMAR GUPTA
>            Priority: Minor
>
> {code}
> 0: jdbc:hive2://10.18.18.214:23040/default> create function addm_3  AS 
> 'com.huawei.bigdata.hive.example.udf.multiply' using jar 
> 'hdfs://hacluster/user/Multiply.jar';
> +---------+--+
> | Result  |
> +---------+--+
> +---------+--+
> No rows selected (0.084 seconds)
> {code}
> {code}
> 0: jdbc:hive2://10.18.18.214:23040/default> create temporary function addm_3  
> AS 'com.huawei.bigdata.hive.example.udf.multiply' using jar 
> 'hdfs://hacluster/user/Multiply.jar';
> INFO  : converting to local hdfs://hacluster/user/Multiply.jar
> INFO  : Added 
> [/tmp/8a396308-41f8-4335-9de4-8268ce5c70fe_resources/Multiply.jar] to class 
> path
> INFO  : Added resources: [hdfs://hacluster/user/Multiply.jar]
> +---------+--+
> | Result  |
> +---------+--+
> +---------+--+
> No rows selected (0.134 seconds)
> {code}
> {code}
> 0: jdbc:hive2://10.18.18.214:23040/default> show functions like addm_3;
> +-----------------+--+
> |    function     |
> +-----------------+--+
> | addm_3          |
> | default.addm_3  |
> +-----------------+--+
> 2 rows selected (0.047 seconds)
> {code}
> When show function executed it is listing both the function but what about 
> the db for permanent function when user has not specified.
> Duplicate should not be allowed if user creating temporary one with the same 
> name.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to