Skip to content

Commit 49d8718

Browse files
committed
simplify
1 parent 979a47d commit 49d8718

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Storages/MergeTree/MutateTask.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ static NameSet collectFilesToSkip(
706706
const Block & updated_header,
707707
const std::set<MergeTreeIndexPtr> & indices_to_recalc,
708708
const String & mrk_extension,
709-
const std::set<ProjectionDescriptionRawPtr> & projections_to_skip,
709+
const std::vector<ProjectionDescriptionRawPtr> & projections_to_skip,
710710
const std::set<ColumnStatisticsPartPtr> & stats_to_recalc)
711711
{
712712
NameSet files_to_skip = source_part->getFileNamesWithoutChecksums();
@@ -2457,8 +2457,7 @@ bool MutateTask::prepare()
24572457
lightweight_mutation_projection_mode == LightweightMutationProjectionMode::DROP
24582458
|| lightweight_mutation_projection_mode == LightweightMutationProjectionMode::THROW;
24592459

2460-
std::set<ProjectionDescriptionRawPtr> projections_to_skip_container;
2461-
auto * projections_to_skip = &projections_to_skip_container;
2460+
std::vector<ProjectionDescriptionRawPtr> projections_to_skip;
24622461

24632462
bool should_create_projections = !(lightweight_delete_mode && lightweight_delete_drops_projections);
24642463
/// Under lightweight delete mode, if option is drop, projections_to_recalc should be empty.
@@ -2469,12 +2468,12 @@ bool MutateTask::prepare()
24692468
ctx->metadata_snapshot,
24702469
ctx->materialized_projections);
24712470

2472-
projections_to_skip = &ctx->projections_to_recalc;
2471+
projections_to_skip.assign(ctx->projections_to_recalc.begin(), ctx->projections_to_recalc.end());
24732472
}
24742473
else
24752474
{
24762475
for (const auto & projection : ctx->metadata_snapshot->getProjections())
2477-
projections_to_skip->insert(&projection);
2476+
projections_to_skip.emplace_back(&projection);
24782477
}
24792478

24802479
ctx->stats_to_recalc = MutationHelpers::getStatisticsToRecalculate(ctx->metadata_snapshot, ctx->materialized_statistics);
@@ -2485,7 +2484,7 @@ bool MutateTask::prepare()
24852484
ctx->updated_header,
24862485
ctx->indices_to_recalc,
24872486
ctx->mrk_extension,
2488-
*projections_to_skip,
2487+
projections_to_skip,
24892488
ctx->stats_to_recalc);
24902489

24912490
ctx->files_to_rename = MutationHelpers::collectFilesForRenames(

0 commit comments

Comments
 (0)