Skip to content

Commit 6eb2720

Browse files
committed
fix
1 parent 456112c commit 6eb2720

6 files changed

Lines changed: 19 additions & 26 deletions

File tree

src/paimon/core/manifest/manifest_committable_test.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ TEST_F(ManifestCommittableTest, TestSimple) {
9292
GetCommitMessages(paimon::test::GetDataDir() +
9393
"/orc/append_09.db/append_09/commit_messages/commit_messages-01",
9494
/*version=*/3);
95-
ManifestCommittable committable(/*identifier=*/123, /*watermark=*/456,
96-
properties, msgs);
95+
ManifestCommittable committable(/*identifier=*/123, /*watermark=*/456, properties, msgs);
9796
ASSERT_EQ(committable.Properties(), properties);
9897
ASSERT_TRUE(IsEqualMsgs(msgs, committable.FileCommittables()));
9998
}

src/paimon/core/operation/commit/commit_changes_provider.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ StaticCommitChangesProvider::StaticCommitChangesProvider(
2424
const std::vector<ManifestEntry>& delta_files,
2525
const std::vector<ManifestEntry>& changelog_files,
2626
const std::vector<IndexManifestEntry>& index_entries)
27-
: delta_files_(delta_files),
28-
changelog_files_(changelog_files),
29-
index_entries_(index_entries) {}
27+
: delta_files_(delta_files), changelog_files_(changelog_files), index_entries_(index_entries) {}
3028

3129
Status StaticCommitChangesProvider::Provide(const std::optional<Snapshot>&,
3230
std::vector<ManifestEntry>* delta_files,

src/paimon/core/operation/commit/commit_scanner.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ CommitScanner::CommitScanner(const std::shared_ptr<SnapshotManager>& snapshot_ma
5353
schema_manager_(schema_manager),
5454
manifest_list_(manifest_list),
5555
manifest_file_(manifest_file),
56-
index_manifest_file_(index_manifest_file),
56+
index_manifest_file_(index_manifest_file),
5757
table_schema_(table_schema),
5858
schema_(schema),
5959
core_options_(core_options),
@@ -132,7 +132,7 @@ Result<std::vector<IndexManifestEntry>> CommitScanner::ReadAllIndexEntriesFromPa
132132

133133
std::vector<std::pair<std::string, std::string>> part_values;
134134
PAIMON_ASSIGN_OR_RAISE(part_values,
135-
partition_computer_->GeneratePartitionVector(entry.partition));
135+
partition_computer_->GeneratePartitionVector(entry.partition));
136136
std::map<std::string, std::string> partition;
137137
for (const auto& [key, value] : part_values) {
138138
partition[key] = value;
@@ -154,8 +154,8 @@ Result<std::vector<IndexManifestEntry>> CommitScanner::ReadAllIndexEntriesFromPa
154154
return false;
155155
};
156156

157-
PAIMON_RETURN_NOT_OK(index_manifest_file_->Read(snapshot.IndexManifest().value(), filter,
158-
&index_entries));
157+
PAIMON_RETURN_NOT_OK(
158+
index_manifest_file_->Read(snapshot.IndexManifest().value(), filter, &index_entries));
159159
return index_entries;
160160
}
161161

src/paimon/core/operation/commit/overwrite_changes_provider.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
namespace paimon {
2626

2727
OverwriteChangesProvider::OverwriteChangesProvider(
28-
const std::vector<ManifestEntry>& changes,
29-
const std::vector<IndexManifestEntry>& index_entries, ManifestScan manifest_scan,
30-
IndexScan index_scan)
28+
const std::vector<ManifestEntry>& changes, const std::vector<IndexManifestEntry>& index_entries,
29+
ManifestScan manifest_scan, IndexScan index_scan)
3130
: changes_(changes),
3231
index_entries_(index_entries),
3332
manifest_scan_(std::move(manifest_scan)),

src/paimon/core/operation/file_store_commit_impl.cpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ FileStoreCommitImpl::FileStoreCommitImpl(
129129
num_bucket_(options.GetBucket()),
130130
bucket_mode_(ResolveBucketMode(options.GetBucket(), table_schema)),
131131
table_schema_(table_schema),
132-
commit_scanner_(snapshot_manager, schema_manager, manifest_list, manifest_file,
133-
index_manifest_file, table_schema, schema, options, executor, pool,
134-
partition_computer_.get(), std::move(scan_supplier)),
132+
commit_scanner_(snapshot_manager, schema_manager, manifest_list, manifest_file,
133+
index_manifest_file, table_schema, schema, options, executor, pool,
134+
partition_computer_.get(), std::move(scan_supplier)),
135135
conflict_detection_(table_schema, options, snapshot_manager_, manifest_list, manifest_file),
136136
manifest_file_(manifest_file),
137137
manifest_list_(manifest_list),
@@ -448,10 +448,10 @@ Status FileStoreCommitImpl::ExecuteOverwrite(
448448
}
449449

450450
if (!skip_overwrite) {
451-
PAIMON_ASSIGN_OR_RAISE(int32_t cnt,
452-
TryOverwrite(overwrite_partitions, changes->append_table_files,
453-
changes->append_index_files, identifier, watermark,
454-
properties));
451+
PAIMON_ASSIGN_OR_RAISE(
452+
int32_t cnt,
453+
TryOverwrite(overwrite_partitions, changes->append_table_files,
454+
changes->append_index_files, identifier, watermark, properties));
455455
*attempt += cnt;
456456
*generated_snapshot += 1;
457457
}
@@ -482,8 +482,7 @@ Result<std::vector<ManifestEntry>> FileStoreCommitImpl::GetAllFiles(
482482
Result<std::map<std::string, std::string>> FileStoreCommitImpl::PartitionToMap(
483483
const BinaryRow& partition) const {
484484
std::vector<std::pair<std::string, std::string>> part_values;
485-
PAIMON_ASSIGN_OR_RAISE(part_values,
486-
partition_computer_->GeneratePartitionVector(partition));
485+
PAIMON_ASSIGN_OR_RAISE(part_values, partition_computer_->GeneratePartitionVector(partition));
487486
std::map<std::string, std::string> partition_map;
488487
for (const auto& [key, value] : part_values) {
489488
partition_map[key] = value;
@@ -649,9 +648,8 @@ Result<int32_t> FileStoreCommitImpl::TryCommit(const std::vector<ManifestEntry>&
649648

650649
Result<int32_t> FileStoreCommitImpl::TryCommit(
651650
const std::shared_ptr<CommitChangesProvider>& changes_provider, int64_t identifier,
652-
std::optional<int64_t> watermark,
653-
const std::map<std::string, std::string>& properties, Snapshot::CommitKind commit_kind,
654-
bool detect_conflicts) {
651+
std::optional<int64_t> watermark, const std::map<std::string, std::string>& properties,
652+
Snapshot::CommitKind commit_kind, bool detect_conflicts) {
655653
conflict_detection_.SetRowIdCheckFromSnapshot(std::nullopt);
656654
int32_t retry_count = 0;
657655
int64_t start_millis = DateTimeUtils::GetCurrentUTCTimeUs() / 1000;

src/paimon/core/operation/file_store_commit_impl.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ class FileStoreCommitImpl : public FileStoreCommit {
136136
Result<int32_t> TryOverwrite(const std::vector<std::map<std::string, std::string>>& partition,
137137
const std::vector<ManifestEntry>& changes,
138138
const std::vector<IndexManifestEntry>& index_entries,
139-
int64_t commit_identifier,
140-
std::optional<int64_t> watermark,
139+
int64_t commit_identifier, std::optional<int64_t> watermark,
141140
const std::map<std::string, std::string>& properties);
142141

143142
Status ExecuteOverwrite(const std::vector<std::map<std::string, std::string>>& partitions,

0 commit comments

Comments
 (0)