Update IMergeTreeDataPart.cpp

This commit is contained in:
tavplubix 2021-12-01 18:00:40 +03:00 committed by GitHub
parent 57e4f3698c
commit 7ae45b9d52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1296,9 +1296,8 @@ String IMergeTreeDataPart::getRelativePathForPrefix(const String & prefix, bool
auto full_relative_path = fs::path(storage.relative_data_path);
if (detached)
full_relative_path /= "detached";
/// TODO What shall we do with projections?
if (detached && parent_part)
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Cannot detach projection");
throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot detach projection");
else if (parent_part)
full_relative_path /= parent_part->relative_path;