[ 
https://issues.apache.org/jira/browse/HIVE-26259?focusedWorklogId=773599&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-773599
 ]

ASF GitHub Bot logged work on HIVE-26259:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/May/22 17:04
            Start Date: 23/May/22 17:04
    Worklog Time Spent: 10m 
      Work Description: wecharyu opened a new pull request, #3316:
URL: https://github.com/apache/hive/pull/3316

   
   ### What changes were proposed in this pull request?
   Add the alteration of resource uris for Function while calling 
`alter_function` api.
   
   
   ### Why are the changes needed?
   Computing engines will load the jar of permanent UDF based on the resource 
uris, if we changed the resource uris through `alter_function` api, which 
apparently won't work, we will not able to use this UDF because of the lack of 
jars.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Add an unit test:
   ```bash
   mvn test 
-Dtest=org.apache.hadoop.hive.metastore.TestObjectStore#testFunctionOps -pl 
:hive-standalone-metastore-server
   ```
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 773599)
    Remaining Estimate: 0h
            Time Spent: 10m

> Alter Function does not update resource uris
> --------------------------------------------
>
>                 Key: HIVE-26259
>                 URL: https://issues.apache.org/jira/browse/HIVE-26259
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 3.1.2
>            Reporter: Wechar
>            Assignee: Wechar
>            Priority: Major
>             Fix For: 4.0.0-alpha-2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> *Bug Description:*
> The jar of Hive permanent UDF can be loaded based on the resource uris, but 
> we encountered an issue after changing the resource uris through spark-sql:
> {code:sql}
> CREATE OR REPLACE FUNCTION test_db.test_udf AS 'com.xxx.xxx'
> USING JAR 'hdfs://path/to/jar';
> {code}
> Then when we use the UDF `test_db.test_udf`, an error occured like this:
> {code:sh}
> Error in query: Can not load class 'com.xxx.xxx' when registering the 
> function 'test_db.test_udf'...
> {code}
> *Root Cause:*
> Hive metastore does not update resource uris while executing 
> `alter_function()`, which should be included and will not make any side 
> effect.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to