mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 13:13:36 +00:00
MergeTree mutations reuse source part index granularity
This commit is contained in:
parent
4c0efb0262
commit
f0e53fde64
@ -24,7 +24,8 @@ MergedBlockOutputStream::MergedBlockOutputStream(
|
||||
const MergeTreeTransactionPtr & txn,
|
||||
bool reset_columns_,
|
||||
bool blocks_are_granules_size,
|
||||
const WriteSettings & write_settings_)
|
||||
const WriteSettings & write_settings_,
|
||||
const MergeTreeIndexGranularity & computed_index_granularity)
|
||||
: IMergedBlockOutputStream(data_part, metadata_snapshot_, columns_list_, reset_columns_)
|
||||
, columns_list(columns_list_)
|
||||
, default_codec(default_codec_)
|
||||
@ -48,7 +49,7 @@ MergedBlockOutputStream::MergedBlockOutputStream(
|
||||
data_part->version.setCreationTID(tid, nullptr);
|
||||
data_part->storeVersionMetadata();
|
||||
|
||||
writer = data_part->getWriter(columns_list, metadata_snapshot, skip_indices, statistics, default_codec, writer_settings, {});
|
||||
writer = data_part->getWriter(columns_list, metadata_snapshot, skip_indices, statistics, default_codec, writer_settings, computed_index_granularity);
|
||||
}
|
||||
|
||||
/// If data is pre-sorted.
|
||||
|
@ -25,7 +25,8 @@ public:
|
||||
const MergeTreeTransactionPtr & txn,
|
||||
bool reset_columns_ = false,
|
||||
bool blocks_are_granules_size = false,
|
||||
const WriteSettings & write_settings = {});
|
||||
const WriteSettings & write_settings = {},
|
||||
const MergeTreeIndexGranularity & computed_index_granularity = {});
|
||||
|
||||
Block getHeader() const { return metadata_snapshot->getSampleBlock(); }
|
||||
|
||||
|
@ -1535,7 +1535,8 @@ private:
|
||||
ctx->txn,
|
||||
/*reset_columns=*/ true,
|
||||
/*blocks_are_granules_size=*/ false,
|
||||
ctx->context->getWriteSettings());
|
||||
ctx->context->getWriteSettings(),
|
||||
ctx->source_part->index_granularity);
|
||||
|
||||
ctx->mutating_pipeline = QueryPipelineBuilder::getPipeline(std::move(builder));
|
||||
ctx->mutating_pipeline.setProgressCallback(ctx->progress_callback);
|
||||
|
Loading…
Reference in New Issue
Block a user