mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
use existing projpart
This commit is contained in:
parent
8fa8d5ac0f
commit
0ee0ab9132
@ -1001,17 +1001,6 @@ void finalizeMutatedPart(
|
||||
|
||||
new_data_part->default_codec = codec;
|
||||
}
|
||||
|
||||
static StorageMetadataPtr generateProjectionPartMetadata(
|
||||
MergeTreeData::DataPartPtr projection_part,
|
||||
StorageMetadataPtr table_metadata[[maybe_unused]])
|
||||
{
|
||||
auto res = std::make_shared<StorageInMemoryMetadata>();
|
||||
/// Currently only ColumnsDescription, later add as needed.
|
||||
res->columns = projection_part->getColumnsDescription();
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct MutationContext
|
||||
@ -1027,8 +1016,6 @@ struct MutationContext
|
||||
FutureMergedMutatedPartPtr future_part;
|
||||
MergeTreeData::DataPartPtr source_part;
|
||||
StorageMetadataPtr metadata_snapshot;
|
||||
/// for projection part only, changed from table part
|
||||
StorageMetadataPtr projection_metadata_snapshot;
|
||||
|
||||
MutationCommandsConstPtr commands;
|
||||
time_t time_of_mutation;
|
||||
@ -2303,11 +2290,9 @@ bool MutateTask::prepare()
|
||||
const auto & projections_name_and_part = ctx->source_part->getProjectionParts();
|
||||
MergeTreeData::DataPartPtr projection_part = projections_name_and_part.begin()->second;
|
||||
|
||||
ctx->projection_metadata_snapshot = MutationHelpers::generateProjectionPartMetadata(projection_part, ctx->metadata_snapshot);
|
||||
|
||||
auto projection_interpreter = std::make_unique<MutationsInterpreter>(
|
||||
*ctx->data, projection_part, alter_conversions,
|
||||
ctx->projection_metadata_snapshot, ctx->for_interpreter,
|
||||
proj_desc.metadata, ctx->for_interpreter,
|
||||
proj_desc.metadata->getColumns().getNamesOfPhysical(), context_for_reading, settings);
|
||||
|
||||
ctx->projection_mutating_pipeline_builder = projection_interpreter->execute();
|
||||
|
Loading…
Reference in New Issue
Block a user