Update MergeTreeData.cpp

Better error message.
This commit is contained in:
Denny Crane 2021-04-12 10:58:06 -03:00 committed by GitHub
parent 99c6daa9b5
commit eaa092cae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2880,7 +2880,7 @@ void MergeTreeData::movePartitionToVolume(const ASTPtr & partition, const String
throw Exception("Volume " + name + " does not exists on policy " + getStoragePolicy()->getName(), ErrorCodes::UNKNOWN_DISK);
if (parts.empty())
throw Exception("Nothing to move", ErrorCodes::NO_SUCH_DATA_PART);
throw Exception("Nothing to move (сheck that the partition exists).", ErrorCodes::NO_SUCH_DATA_PART);
parts.erase(std::remove_if(parts.begin(), parts.end(), [&](auto part_ptr)
{