Merge pull request #22994 from den-crane/patch-14

Update MergeTreeData.cpp Better error message.
This commit is contained in:
Maksim Kita 2021-04-12 19:43:15 +03:00 committed by GitHub
commit 615362f928
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)
{