mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #28135 from amosbird/projection-improve3
Get rid of useless projection columns during merge
This commit is contained in:
commit
2403686bb9
@ -494,7 +494,6 @@ static void extractMergingAndGatheringColumns(
|
||||
const NamesAndTypesList & storage_columns,
|
||||
const ExpressionActionsPtr & sorting_key_expr,
|
||||
const IndicesDescription & indexes,
|
||||
const ProjectionsDescription & projections,
|
||||
const MergeTreeData::MergingParams & merging_params,
|
||||
NamesAndTypesList & gathering_columns, Names & gathering_column_names,
|
||||
NamesAndTypesList & merging_columns, Names & merging_column_names)
|
||||
@ -508,13 +507,6 @@ static void extractMergingAndGatheringColumns(
|
||||
std::inserter(key_columns, key_columns.end()));
|
||||
}
|
||||
|
||||
for (const auto & projection : projections)
|
||||
{
|
||||
Names projection_columns_vec = projection.required_columns;
|
||||
std::copy(projection_columns_vec.cbegin(), projection_columns_vec.cend(),
|
||||
std::inserter(key_columns, key_columns.end()));
|
||||
}
|
||||
|
||||
/// Force sign column for Collapsing mode
|
||||
if (merging_params.mode == MergeTreeData::MergingParams::Collapsing)
|
||||
key_columns.emplace(merging_params.sign_column);
|
||||
@ -728,7 +720,6 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mergePartsToTempor
|
||||
storage_columns,
|
||||
metadata_snapshot->getSortingKey().expression,
|
||||
metadata_snapshot->getSecondaryIndices(),
|
||||
metadata_snapshot->getProjections(),
|
||||
merging_params,
|
||||
gathering_columns,
|
||||
gathering_column_names,
|
||||
|
Loading…
Reference in New Issue
Block a user