You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Peter Vary (JIRA)" <ji...@apache.org> on 2018/03/29 13:22:00 UTC

[jira] [Commented] (HIVE-19076) Fix NPE and TApplicationException in function related HiveMetastore methods

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

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

As discussed offline, not too happy with this solution, but with the given constraints we were not able to come up with any better one.

So +1 pending tests

> 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
>
>
> 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)