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

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

    [ https://issues.apache.org/jira/browse/HIVE-18697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16389323#comment-16389323 ] 

Marta Kuczora commented on HIVE-18697:
--------------------------------------

Thanks a lot [~pvary] for committing the patch.

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