Use storage_snapshot for projection analysis

This commit is contained in:
Amos Bird 2022-04-07 19:56:31 +08:00
parent 99a55a2304
commit a071bde59e
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4

View File

@ -5176,7 +5176,9 @@ std::optional<ProjectionCandidate> MergeTreeData::getQueryProcessingStageWithAgg
if (const StorageReplicatedMergeTree * replicated = dynamic_cast<const StorageReplicatedMergeTree *>(this))
max_added_blocks = std::make_shared<PartitionIdToMaxBlock>(replicated->getMaxAddedBlocks());
}
auto parts = getDataPartsVector();
const auto & snapshot_data = assert_cast<const MergeTreeData::SnapshotData &>(*storage_snapshot->data);
const auto & parts = snapshot_data.parts;
// If minmax_count_projection is a valid candidate, check its completeness.
if (minmax_count_projection_candidate)