Skip to content

Commit 29d4585

Browse files
committed
fix style
1 parent c4ee181 commit 29d4585

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

src/Storages/MergeTree/MergeTreeData.cpp

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4839,21 +4839,6 @@ Strings getPartFiles(MergeTreeData::MutableDataPartPtr & part, bool with_project
48394839
}
48404840

48414841

4842-
String getDebugString(const Strings & arg)
4843-
{
4844-
WriteBufferFromOwnString out;
4845-
{
4846-
auto it = arg.begin();
4847-
if (it != arg.end())
4848-
out << *it;
4849-
++it;
4850-
for (; it != arg.end(); ++it)
4851-
out << ", " << *it;
4852-
}
4853-
return out.str();
4854-
}
4855-
4856-
48574842
void MergeTreeData::checkChecksumsFileIsConsistentWithFileSystem(MutableDataPartPtr & part)
48584843
{
48594844
Strings files_in_part = getPartFiles(part);
@@ -4877,18 +4862,16 @@ void MergeTreeData::checkChecksumsFileIsConsistentWithFileSystem(MutableDataPart
48774862
LOG_DEBUG(getLogger("checkChecksumsFileIsConsistentWithFileSystem"), "checksums has {} files, new part has {} files, files in checksums: {}, files in part: {}",
48784863
part->checksums.files.size(),
48794864
files_in_part.size(),
4880-
getDebugString(files_in_checksums),
4881-
getDebugString(files_in_part));
4865+
fmt::join(files_in_checksums, ", "),
4866+
fmt::join(files_in_part, ", "));
48824867

48834868
if (files_in_part != files_in_checksums)
48844869
throw Exception(ErrorCodes::LOGICAL_ERROR, "checksums.txt file is not consistent with the files on file system, checksums.txt file has {} files, part '{}' has {} files, files in checksums: {}, files in part: {}",
48854870
part->checksums.files.size(),
48864871
part->name,
48874872
files_in_part.size(),
4888-
getDebugString(files_in_checksums),
4889-
getDebugString(files_in_part));
4890-
4891-
4873+
fmt::join(files_in_checksums, ", "),
4874+
fmt::join(files_in_part, ", "));
48924875
}
48934876

48944877

src/Storages/MergeTree/MergeTreeDataPartChecksum.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#pragma once
22

33
#include <base/types.h>
4+
#include <Disks/IDisk.h>
5+
#include <IO/ReadBuffer.h>
6+
#include <IO/WriteBuffer.h>
7+
#include <Core/Types_fwd.h>
48

59
#include <map>
610
#include <optional>

src/Storages/MergeTree/MutateTask.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,8 +1801,6 @@ class MutateSomePartColumnsTask : public IExecutableTask
18011801

18021802
NameSet hardlinked_files;
18031803

1804-
1805-
18061804
/// NOTE: Renames must be done in order
18071805
for (const auto & [rename_from, rename_to] : ctx->files_to_rename)
18081806
{
@@ -1845,7 +1843,7 @@ class MutateSomePartColumnsTask : public IExecutableTask
18451843
String destination = it->name();
18461844

18471845
LOG_DEBUG(getLogger("MutateSomePartColumnsTask"), "rename unchanged {} -> {}",
1848-
file_name, destination);
1846+
file_name, destination);
18491847

18501848
if (it->isFile())
18511849
{

0 commit comments

Comments
 (0)