Marta Kuczora created HIVE-19076:
------------------------------------

             Summary: 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


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.



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

Reply via email to