Skip to content

Commit 20376f2

Browse files
committed
address pr comments
1 parent 497b488 commit 20376f2

File tree

9 files changed

+12
-11
lines changed

9 files changed

+12
-11
lines changed

docs/en/engines/table-engines/mergetree-family/part_export.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ destination_database: default
105105
destination_table: destination_table
106106
create_time: 2025-11-19 09:09:11
107107
part_name: 20251016-365_1_1_0
108-
destination_file_paths: ['table_root/eventDate=2025-10-16/retention=365/20251016-365_1_1_0_17B2F6CD5D3C18E787C07AE3DAF16EB1.parquet']
108+
destination_file_paths: ['table_root/eventDate=2025-10-16/retention=365/20251016-365_1_1_0_17B2F6CD5D3C18E787C07AE3DAF16EB1.1.parquet']
109109
elapsed: 2.04845441
110110
rows_read: 1138688 -- 1.14 million
111111
total_rows_to_read: 550961374 -- 550.96 million
@@ -151,7 +151,7 @@ partition: 2021
151151
part_type: Compact
152152
disk_name: default
153153
path_on_disk:
154-
remote_file_paths ['year=2021/2021_0_0_0_78C704B133D41CB0EF64DD2A9ED3B6BA.parquet']
154+
remote_file_paths ['year=2021/2021_0_0_0_78C704B133D41CB0EF64DD2A9ED3B6BA.1.parquet']
155155
rows: 1
156156
size_in_bytes: 272
157157
merged_from: ['2021_0_0_0']

src/Storages/IStorage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ It is currently only implemented in StorageObjectStorage.
466466
virtual SinkToStoragePtr import(
467467
const std::string & /* file_name */,
468468
Block & /* block_with_partition_values */,
469-
std::function<void(const std::string &)> /* new_file_path_callback */,
469+
const std::function<void(const std::string &)> & /* new_file_path_callback */,
470470
bool /* overwrite_if_exists */,
471471
std::size_t /* max_bytes_per_file */,
472472
std::size_t /* max_rows_per_file */,

src/Storages/MergeTree/ExportPartitionUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ namespace ExportPartitionUtils
7676

7777
if (exported_paths.empty())
7878
{
79-
LOG_INFO(log, "ExportPartition: No exported paths found, will not commit export. This might be a bug");
79+
LOG_WARNING(log, "ExportPartition: No exported paths found, will not commit export. This might be a bug");
8080
return;
8181
}
8282

8383
//// not checking for an exact match because a single part might generate multiple files
8484
if (exported_paths.size() < manifest.parts.size())
8585
{
86-
LOG_INFO(log, "ExportPartition: Reached the commit phase, but exported paths size is less than the number of parts, will not commit export. This might be a bug");
86+
LOG_WARNING(log, "ExportPartition: Reached the commit phase, but exported paths size is less than the number of parts, will not commit export. This might be a bug");
8787
return;
8888
}
8989

src/Storages/ObjectStorage/MultiFileStorageObjectStorageSink.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ MultiFileStorageObjectStorageSink::MultiFileStorageObjectStorageSink(
1919
std::size_t max_bytes_per_file_,
2020
std::size_t max_rows_per_file_,
2121
bool overwrite_if_exists_,
22-
std::function<void(const std::string &)> new_file_path_callback_,
22+
const std::function<void(const std::string &)> & new_file_path_callback_,
2323
const std::optional<FormatSettings> & format_settings_,
2424
SharedHeader sample_block_,
2525
ContextPtr context_)
@@ -72,6 +72,7 @@ std::shared_ptr<StorageObjectStorageSink> MultiFileStorageObjectStorageSink::cre
7272
{
7373
auto new_path = generateNewFilePath();
7474

75+
/// todo
7576
/// sounds like bad design, but callers might decide to ignore the exception, and if we throw it before the callback
7677
/// they will not be able to grab the file path.
7778
/// maybe I should consider moving the file already exists policy in here?

src/Storages/ObjectStorage/MultiFileStorageObjectStorageSink.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MultiFileStorageObjectStorageSink : public SinkToStorage
1919
std::size_t max_bytes_per_file_,
2020
std::size_t max_rows_per_file_,
2121
bool overwrite_if_exists_,
22-
std::function<void(const std::string &)> new_file_path_callback_,
22+
const std::function<void(const std::string &)> & new_file_path_callback_,
2323
const std::optional<FormatSettings> & format_settings_,
2424
SharedHeader sample_block_,
2525
ContextPtr context_);

src/Storages/ObjectStorage/StorageObjectStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ bool StorageObjectStorage::supportsImport() const
502502
SinkToStoragePtr StorageObjectStorage::import(
503503
const std::string & file_name,
504504
Block & block_with_partition_values,
505-
std::function<void(const std::string &)> new_file_path_callback,
505+
const std::function<void(const std::string &)> & new_file_path_callback,
506506
bool overwrite_if_exists,
507507
std::size_t max_bytes_per_file,
508508
std::size_t max_rows_per_file,

src/Storages/ObjectStorage/StorageObjectStorage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class StorageObjectStorage : public IStorage
8787
SinkToStoragePtr import(
8888
const std::string & /* file_name */,
8989
Block & /* block_with_partition_values */,
90-
std::function<void(const std::string &)> new_file_path_callback,
90+
const std::function<void(const std::string &)> & new_file_path_callback,
9191
bool /* overwrite_if_exists */,
9292
std::size_t /* max_bytes_per_file */,
9393
std::size_t /* max_rows_per_file */,

src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ bool StorageObjectStorageCluster::supportsImport() const
576576
SinkToStoragePtr StorageObjectStorageCluster::import(
577577
const std::string & file_name,
578578
Block & block_with_partition_values,
579-
std::function<void(const std::string &)> new_file_path_callback,
579+
const std::function<void(const std::string &)> & new_file_path_callback,
580580
bool overwrite_if_exists,
581581
std::size_t max_bytes_per_file,
582582
std::size_t max_rows_per_file,

src/Storages/ObjectStorage/StorageObjectStorageCluster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class StorageObjectStorageCluster : public IStorageCluster
128128
SinkToStoragePtr import(
129129
const std::string & /* file_name */,
130130
Block & /* block_with_partition_values */,
131-
std::function<void(const std::string &)> /* new_file_path_callback */,
131+
const std::function<void(const std::string &)> & /* new_file_path_callback */,
132132
bool /* overwrite_if_exists */,
133133
std::size_t /* max_bytes_per_file */,
134134
std::size_t /* max_rows_per_file */,

0 commit comments

Comments
 (0)