[
https://issues.apache.org/jira/browse/HIVE-18892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409565#comment-16409565
]
Marta Kuczora commented on HIVE-18892:
--------------------------------------
Thanks a lot [~pvary] for committing the patch!
> 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
> Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HIVE-18892.1.patch
>
>
> 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)