You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Marta Kuczora (JIRA)" <ji...@apache.org> on 2018/03/07 11:10:00 UTC

[jira] [Created] (HIVE-18892) Fix NPEs in HiveMetastore.exchange_partitions method

Marta Kuczora created HIVE-18892:
------------------------------------

             Summary: Fix NPEs in HiveMetastore.exchange_partitions method
                 Key: HIVE-18892
                 URL: https://issues.apache.org/jira/browse/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
(v7.6.3#76005)