| 106 | } |
| 107 | |
| 108 | MergeTreeDataMerger::MergeTreeDataMerger( |
| 109 | MergeTreeMetaBase & data_, |
| 110 | const ManipulationTaskParams & params_, |
| 111 | ContextPtr context_, |
| 112 | ManipulationListElement * manipulation_entry_, |
| 113 | CheckCancelCallback check_cancel_, |
| 114 | bool build_rowid_mappings_) |
| 115 | : data(data_) |
| 116 | , data_settings(data.getSettings()) |
| 117 | , params(params_) |
| 118 | , context(context_) |
| 119 | , task_manipulation_entry(manipulation_entry_) |
| 120 | , check_cancel(std::move(check_cancel_)) |
| 121 | , build_rowid_mappings(build_rowid_mappings_) |
| 122 | , rowid_mappings(params.source_data_parts.size()) |
| 123 | , log(&Poco::Logger::get(data.getLogName() + " (Merger)")) |
| 124 | { |
| 125 | if (build_rowid_mappings && data.merging_params.mode != MergeTreeMetaBase::MergingParams::Ordinary) |
| 126 | throw Exception( |
| 127 | ErrorCodes::LOGICAL_ERROR, "Rowid mapping is only supported for Ordinal mode, got {}", data.merging_params.getModeName()); |
| 128 | space_reservation = data.reserveSpace(estimateNeededDiskSpace(params.source_data_parts), IStorage::StorageLocation::AUXILITY); |
| 129 | } |
| 130 | |
| 131 | MergeTreeDataMerger::~MergeTreeDataMerger() |
| 132 | { |
nothing calls this directly
no test coverage detected