Marta Kuczora reassigned HIVE-18697:

> 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
> 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

Reply via email to