Skip to content

Commit ca5c34a

Browse files
committed
fix(manifest): fix clang-tidy warnings in ManifestMergeManager
1 parent a38da04 commit ca5c34a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/iceberg/manifest/manifest_merge_manager.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include <algorithm>
2323
#include <map>
24+
#include <ranges>
2425
#include <utility>
2526
#include <vector>
2627

@@ -63,7 +64,7 @@ Result<std::vector<ManifestFile>> ManifestMergeManager::MergeManifests(
6364
// content types. Use reverse spec ordering to match Java's reverse-TreeMap behaviour,
6465
// which is observable in v3 tables where first-row IDs are assigned in output order.
6566
using GroupKey = std::pair<int32_t, ManifestContent>;
66-
std::map<GroupKey, std::vector<ManifestFile>, std::greater<GroupKey>> by_spec;
67+
std::map<GroupKey, std::vector<ManifestFile>, std::greater<>> by_spec;
6768
for (const auto& m : all) {
6869
by_spec[{m.partition_spec_id, m.content}].push_back(m);
6970
}
@@ -97,8 +98,7 @@ Result<std::vector<ManifestFile>> ManifestMergeManager::MergeGroup(
9798
std::vector<ManifestFile> current_bin;
9899
int64_t bin_size = 0;
99100

100-
for (auto it = group.rbegin(); it != group.rend(); ++it) {
101-
const auto& manifest = *it;
101+
for (const auto& manifest : std::views::reverse(group)) {
102102
if (!current_bin.empty() &&
103103
bin_size + manifest.manifest_length > target_size_bytes_) {
104104
bins.push_back(std::move(current_bin));

0 commit comments

Comments
 (0)