diff --git a/src/Storages/MergeTree/IMergeTreeDataPart.cpp b/src/Storages/MergeTree/IMergeTreeDataPart.cpp index ddad21a6421..f4a5d9486ad 100644 --- a/src/Storages/MergeTree/IMergeTreeDataPart.cpp +++ b/src/Storages/MergeTree/IMergeTreeDataPart.cpp @@ -1162,16 +1162,9 @@ void IMergeTreeDataPart::loadColumns(bool require) bool exists = metadata_manager->exists("columns.txt"); if (!exists) { - auto & manager_ref = *metadata_manager; - if ((require || part_type == Type::Compact) && !data_part_storage->exists("columns.txt")) - throw Exception("No columns.txt in part (data_part_storage) " + name + ", expected path " + path + " on drive " + data_part_storage->getName() + - " manager " + demangle(typeid(manager_ref).name()), - ErrorCodes::NO_FILE_IN_DATA_PART); - /// We can get list of columns only from columns.txt in compact parts. if (require || part_type == Type::Compact) - throw Exception("No columns.txt in part " + name + ", expected path " + path + " on drive " + data_part_storage->getName() + - " manager " + demangle(typeid(manager_ref).name()), + throw Exception("No columns.txt in part " + name + ", expected path " + path + " on drive " + data_part_storage->getName(), ErrorCodes::NO_FILE_IN_DATA_PART); /// If there is no file with a list of columns, write it down.