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

Peter Vary commented on HIVE-19076:
-----------------------------------

+1

> Fix NPE and TApplicationException in function related HiveMetastore methods
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-19076
>                 URL: https://issues.apache.org/jira/browse/HIVE-19076
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Marta Kuczora
>            Assignee: Marta Kuczora
>            Priority: Minor
>         Attachments: HIVE-19076.1.patch, HIVE-19076.2.patch, 
> HIVE-19076.3.patch
>
>
> The TestFunctions tests revealed that NPE is thrown in some cases. These NPEs 
> could be prevented with a simple null check and a MetaException with a proper 
> error message should be thrown instead.
>  Example: NPE is thrown in the following test cases
>  * testCreateFunctionNullFunctionName
>  * testCreateFunctionNullDatabaseName
>  * testCreateFunctionNullOwnerType
>  * testCreateFunctionNullFunctionType
>  * testGetFunctionNullDatabase
>  * testDropFunctionNullDatabase
>  * testDropFunctionNullFunctionName
>  * testAlterFunctionNullDatabase
>  * testAlterFunctionNullFunctionName
>  * testAlterFunctionNullFunction
>  * testAlterFunctionNullFunctionNameInNew
>  * testAlterFunctionNullDatabaseNameInNew
>  * testAlterFunctionNullOwnerTypeInNew
>  * testAlterFunctionNullFunctionTypeInNew
> Also there are some alter function tests where InvalidObjectException is 
> thrown with Embedded MetaStore, but TApplicationException it thrown with 
> Remote MetaStore. The reason is that the InvalidObjectException is not 
> defined for the alter_function method in the thrift interface, so we got the 
> TApplicationException when the InvalidObjectException was thrown. In these 
> cases the InvalidObjectException could be handled on the server side and 
> re-throw it as a MetaException



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to