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)