Skip to content

Commit 495cf3e

Browse files
committed
remove outdated code
1 parent 61299b7 commit 495cf3e

File tree

6 files changed

+5
-17
lines changed

6 files changed

+5
-17
lines changed

src/Storages/MergeTree/FutureMergedMutatedPart.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void FutureMergedMutatedPart::assign(MergeTreeData::DataPartsVector parts_)
2626
future_part_storage_type = std::min(future_part_storage_type, part->getDataPartStorage().getType());
2727
}
2828

29-
auto chosen_format = parts_.front()->storage.choosePartFormatOnDisk(sum_bytes_uncompressed, sum_rows);
29+
auto chosen_format = parts_.front()->storage.choosePartFormat(sum_bytes_uncompressed, sum_rows);
3030
future_part_type = std::min(future_part_type, chosen_format.part_type);
3131
future_part_storage_type = std::min(future_part_storage_type, chosen_format.storage_type);
3232
assign(std::move(parts_), {future_part_type, future_part_storage_type});

src/Storages/MergeTree/MergeTreeData.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4216,11 +4216,6 @@ MergeTreeDataPartFormat MergeTreeData::choosePartFormat(size_t bytes_uncompresse
42164216
return {part_type, PartStorageType::Full};
42174217
}
42184218

4219-
MergeTreeDataPartFormat MergeTreeData::choosePartFormatOnDisk(size_t bytes_uncompressed, size_t rows_count) const
4220-
{
4221-
return choosePartFormat(bytes_uncompressed, rows_count);
4222-
}
4223-
42244219
MergeTreeDataPartBuilder MergeTreeData::getDataPartBuilder(
42254220
const String & name, const VolumePtr & volume, const String & part_dir, const ReadSettings & read_settings_) const
42264221
{
@@ -9318,7 +9313,7 @@ std::pair<MergeTreeData::MutableDataPartPtr, scope_guard> MergeTreeData::createE
93189313

93199314
auto tmp_dir_holder = getTemporaryPartDirectoryHolder(EMPTY_PART_TMP_PREFIX + new_part_name);
93209315
auto new_data_part = getDataPartBuilder(new_part_name, data_part_volume, EMPTY_PART_TMP_PREFIX + new_part_name, getReadSettings())
9321-
.withBytesAndRowsOnDisk(0, 0)
9316+
.withBytesAndRows(0, 0)
93229317
.withPartInfo(new_part_info)
93239318
.build();
93249319

src/Storages/MergeTree/MergeTreeData.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ class MergeTreeData : public IStorage, public WithMutableContext
263263
OperationDataPartsLock lockOperationsWithParts() const { return OperationDataPartsLock(operation_with_data_parts_mutex); }
264264

265265
MergeTreeDataPartFormat choosePartFormat(size_t bytes_uncompressed, size_t rows_count) const;
266-
MergeTreeDataPartFormat choosePartFormatOnDisk(size_t bytes_uncompressed, size_t rows_count) const;
267266
MergeTreeDataPartBuilder getDataPartBuilder(const String & name, const VolumePtr & volume, const String & part_dir, const ReadSettings & read_settings_) const;
268267

269268
/// Auxiliary object to add a set of parts into the working set in two steps:

src/Storages/MergeTree/MergeTreeDataPartBuilder.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ MergeTreeDataPartBuilder & MergeTreeDataPartBuilder::withPartFormatFromVolume()
165165
if (!storage || !mark_type)
166166
{
167167
/// Didn't find any data or mark file, suppose that part is empty.
168-
return withBytesAndRowsOnDisk(0, 0);
168+
return withBytesAndRows(0, 0);
169169
}
170170

171171
part_storage = std::move(storage);
@@ -181,7 +181,7 @@ MergeTreeDataPartBuilder & MergeTreeDataPartBuilder::withPartFormatFromStorage()
181181
if (!mark_type)
182182
{
183183
/// Didn't find any mark file, suppose that part is empty.
184-
return withBytesAndRowsOnDisk(0, 0);
184+
return withBytesAndRows(0, 0);
185185
}
186186

187187
part_type = mark_type->part_type;
@@ -193,9 +193,4 @@ MergeTreeDataPartBuilder & MergeTreeDataPartBuilder::withBytesAndRows(size_t byt
193193
return withPartFormat(data.choosePartFormat(bytes_uncompressed, rows_count));
194194
}
195195

196-
MergeTreeDataPartBuilder & MergeTreeDataPartBuilder::withBytesAndRowsOnDisk(size_t bytes_uncompressed, size_t rows_count)
197-
{
198-
return withPartFormat(data.choosePartFormatOnDisk(bytes_uncompressed, rows_count));
199-
}
200-
201196
}

src/Storages/MergeTree/MergeTreeDataPartBuilder.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class MergeTreeDataPartBuilder
3636
Self & withPartFormat(MergeTreeDataPartFormat format_);
3737
Self & withPartFormatFromDisk();
3838
Self & withBytesAndRows(size_t bytes_uncompressed, size_t rows_count);
39-
Self & withBytesAndRowsOnDisk(size_t bytes_uncompressed, size_t rows_count);
4039

4140
using PartStorageAndMarkType = std::pair<MutableDataPartStoragePtr, std::optional<MarkType>>;
4241

src/Storages/MergeTree/MergeTreeDataWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ MergeTreeTemporaryPartPtr MergeTreeDataWriter::writeProjectionPartImpl(
805805
size_t expected_size = block.bytes();
806806
// just check if there is enough space on parent volume
807807
MergeTreeData::reserveSpace(expected_size, parent_part->getDataPartStorage());
808-
part_type = data.choosePartFormatOnDisk(expected_size, block.rows()).part_type;
808+
part_type = data.choosePartFormat(expected_size, block.rows()).part_type;
809809

810810
auto new_data_part = parent_part->getProjectionPartBuilder(part_name, is_temp).withPartType(part_type).build();
811811
auto projection_part_storage = new_data_part->getDataPartStoragePtr();

0 commit comments

Comments
 (0)