fix mutations

This commit is contained in:
CurtizJ 2020-02-04 15:11:32 +03:00
parent 1785b27ae5
commit 31c39c8137
3 changed files with 5 additions and 13 deletions

View File

@ -71,7 +71,6 @@ public:
virtual bool isStoredOnDisk() const = 0; virtual bool isStoredOnDisk() const = 0;
virtual bool supportsVerticalMerge() const { return false; } virtual bool supportsVerticalMerge() const { return false; }
/// NOTE: Returns zeros if column files are not found in checksums. /// NOTE: Returns zeros if column files are not found in checksums.

View File

@ -942,15 +942,6 @@ protected:
void setStoragePolicy(const String & new_storage_policy_name, bool only_check = false); void setStoragePolicy(const String & new_storage_policy_name, bool only_check = false);
/// out_rename_map maps column files for the out_expression onto new table files.
/// out_force_update_metadata denotes if metadata must be changed even if out_rename_map is empty (used
/// for transformation-free changing of Enum values list).
/// Files to be deleted are mapped to an empty string in out_rename_map.
/// If part == nullptr, just checks that all type conversions are possible.
// void createConvertExpression(const DataPartPtr & part, const NamesAndTypesList & old_columns, const NamesAndTypesList & new_columns,
// const IndicesASTs & old_indices, const IndicesASTs & new_indices,
// ExpressionActionsPtr & out_expression, NameToNameMap & out_rename_map, bool & out_force_update_metadata) const;
/// Calculates column sizes in compressed form for the current state of data_parts. Call with data_parts mutex locked. /// Calculates column sizes in compressed form for the current state of data_parts. Call with data_parts mutex locked.
void calculateColumnSizesImpl(); void calculateColumnSizesImpl();
/// Adds or subtracts the contribution of the part to compressed column sizes. /// Adds or subtracts the contribution of the part to compressed column sizes.

View File

@ -990,16 +990,18 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mutatePartToTempor
auto new_data_part = data.createPart( auto new_data_part = data.createPart(
future_part.name, future_part.name,
source_part->getType(),
future_part.part_info, future_part.part_info,
space_reservation->getDisk(), space_reservation->getDisk(),
std::move(new_columns),
source_part->bytes_on_disk,
source_part->rows_count,
"tmp_mut_" + future_part.name); "tmp_mut_" + future_part.name);
new_data_part->is_temp = true; new_data_part->is_temp = true;
new_data_part->ttl_infos = source_part->ttl_infos; new_data_part->ttl_infos = source_part->ttl_infos;
/// It shouldn't be changed by mutation.
new_data_part->index_granularity_info = source_part->index_granularity_info;
new_data_part->setColumns(new_columns);
String new_part_tmp_path = new_data_part->getFullPath(); String new_part_tmp_path = new_data_part->getFullPath();
/// Note: this is done before creating input streams, because otherwise data.data_parts_mutex /// Note: this is done before creating input streams, because otherwise data.data_parts_mutex