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/02/13 10:41:02 UTC

[jira] [Created] (HIVE-18697) The HiveMetastore.exchange_partitions method throws FileNotFoundException if the given partition doesn't exist in the source table

Marta Kuczora created HIVE-18697:
------------------------------------

             Summary: The HiveMetastore.exchange_partitions method throws FileNotFoundException if the given partition doesn't exist in the source table
                 Key: HIVE-18697
                 URL: https://issues.apache.org/jira/browse/HIVE-18697
             Project: Hive
          Issue Type: Bug
          Components: Metastore
            Reporter: Marta Kuczora
            Assignee: Marta Kuczora


If calling the HiveMetastore.exchange_partitions method with a non-existing partition, a FileNotFoundException will occur. Since the partitions of the source table are fetched
{code:java}
List<Partition> partitionsToExchange = get_partitions_ps(sourceDbName, sourceTableName,
          partVals, (short)-1);
{code}
this use case could be handled better by checking if the partitionsToExchange list is empty and if it is, throw a MetaException with a proper error message that no partition exists for the source table with the given values.

See the testExchangePartitionsNoPartExists test case in the TestExchangePartitions test.



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