[
https://issues.apache.org/jira/browse/HIVE-18697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Vary updated HIVE-18697:
------------------------------
Resolution: Fixed
Fix Version/s: 3.0.0
Status: Resolved (was: Patch Available)
Pushed to master.
Thanks for the patch [~kuczoram]!
> 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
> Priority: Minor
> Fix For: 3.0.0
>
> Attachments: HIVE-18697.1.patch
>
>
> 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)