Marta Kuczora created HIVE-18892:

             Summary: Fix NPEs in HiveMetastore.exchange_partitions method
                 Key: HIVE-18892
             Project: Hive
          Issue Type: Bug
          Components: Metastore
            Reporter: Marta Kuczora
            Assignee: Marta Kuczora

The TestExchangePartitions tests revealed that NPE is thrown if the 
exchange_partitions method is called with null, empty or non-existing DB and 
table names. 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
 * testExchangePartitionsNonExistingSourceTable
 * testExchangePartitionsNonExistingSourceDB
 * testExchangePartitionsNonExistingDestTable
 * testExchangePartitionsNonExistingDestDB
 * testExchangePartitionsEmptySourceTable
 * testExchangePartitionsEmptySourceDB
 * testExchangePartitionsEmptyDestTable
 * testExchangePartitionsEmptyDestDB
 * testExchangePartitionsNullSourceTable
 * testExchangePartitionsNullSourceDB
 * testExchangePartitionsNullDestTable
 * testExchangePartitionsNullDestDB
 * testExchangePartitionsNullPartSpec

This message was sent by Atlassian JIRA

Reply via email to