Fix 02494_zero_copy_and_projection_and_mutation_work_together.sql with shared merge tree

This commit is contained in:
kssenii 2024-03-25 14:59:37 +01:00
parent e3d2fb28cf
commit 38b15fb2a3

View File

@ -815,10 +815,12 @@ void IMergeTreeDataPart::loadProjections(bool require_columns_checksums, bool ch
addProjectionPart(projection.name, std::move(part));
}
}
else if (checksums.has(path))
else if (check_consistency && checksums.has(path))
{
auto part = getProjectionPartBuilder(projection.name).withPartFormatFromDisk().build();
part->setBrokenReason("Projection directory " + path + " does not exist while loading projections", ErrorCodes::NO_FILE_IN_DATA_PART);
part->setBrokenReason(
"Projection directory " + path + " does not exist while loading projections. Stacktrace: " + StackTrace().toString(),
ErrorCodes::NO_FILE_IN_DATA_PART);
addProjectionPart(projection.name, std::move(part));
has_broken_projection = true;
}