mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Fix materialize ttl
This commit is contained in:
parent
cb1b899cd8
commit
f5f55988f8
@ -1054,6 +1054,10 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mutatePartToTempor
|
||||
};
|
||||
|
||||
bool need_remove_expired_values = false;
|
||||
|
||||
if (in && should_execute_ttl(in->getHeader().getNamesAndTypesList().getNames()))
|
||||
need_remove_expired_values = true;
|
||||
|
||||
/// All columns from part are changed and may be some more that were missing before in part
|
||||
if (source_part->getColumns().isSubsetOf(updated_header.getNamesAndTypesList()))
|
||||
{
|
||||
@ -1062,11 +1066,8 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mutatePartToTempor
|
||||
in = std::make_shared<MaterializingBlockInputStream>(
|
||||
std::make_shared<ExpressionBlockInputStream>(in, data.primary_key_and_skip_indices_expr));
|
||||
|
||||
if (should_execute_ttl(in->getHeader().getNamesAndTypesList().getNames()))
|
||||
{
|
||||
need_remove_expired_values = true;
|
||||
if (need_remove_expired_values)
|
||||
in = std::make_shared<TTLBlockInputStream>(in, data, new_data_part, time_of_mutation, true);
|
||||
}
|
||||
|
||||
IMergeTreeDataPart::MinMaxIndex minmax_idx;
|
||||
|
||||
@ -1342,7 +1343,8 @@ void MergeTreeDataMergerMutator::splitMutationCommands(
|
||||
{
|
||||
if (command.type == MutationCommand::Type::DELETE
|
||||
|| command.type == MutationCommand::Type::UPDATE
|
||||
|| command.type == MutationCommand::Type::MATERIALIZE_INDEX)
|
||||
|| command.type == MutationCommand::Type::MATERIALIZE_INDEX
|
||||
|| command.type == MutationCommand::Type::MATERIALIZE_TTL)
|
||||
{
|
||||
for_interpreter.push_back(command);
|
||||
}
|
||||
|
@ -5253,11 +5253,6 @@ void StorageReplicatedMergeTree::getCommitPartOps(
|
||||
}
|
||||
|
||||
/// Information about the part, in the replica
|
||||
|
||||
//ops.emplace_back(zkutil::makeCheckRequest(
|
||||
// zookeeper_path + "/columns",
|
||||
// columns_version));
|
||||
|
||||
if (storage_settings_ptr->use_minimalistic_part_header_in_zookeeper)
|
||||
{
|
||||
ops.emplace_back(zkutil::makeCreateRequest(
|
||||
|
Loading…
Reference in New Issue
Block a user