Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/iceberg/metadata_columns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,11 @@ const std::set<int32_t>& MetadataColumns::MetadataFieldIds() {
}

bool MetadataColumns::IsMetadataColumn(std::string_view name) {
return name == kPartitionColumnName ||
GetMetadataColumnMap().find(name) != GetMetadataColumnMap().end();
return name == kPartitionColumnName || GetMetadataColumnMap().contains(name);
}

bool MetadataColumns::IsMetadataColumn(int32_t id) {
return GetMetadataFieldIdSet().find(id) != GetMetadataFieldIdSet().end();
return GetMetadataFieldIdSet().contains(id);
}

bool MetadataColumns::IsRowLineageColumn(int32_t id) {
Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/table_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ Status TableMetadataBuilder::Impl::SetDefaultSortOrder(int32_t order_id) {
Result<int32_t> TableMetadataBuilder::Impl::AddSortOrder(const SortOrder& order) {
int32_t new_order_id = ReuseOrCreateNewSortOrderId(order);

if (sort_orders_by_id_.find(new_order_id) != sort_orders_by_id_.end()) {
if (sort_orders_by_id_.contains(new_order_id)) {
// update last_added_order_id if the order was added in this set of changes (since it
// is now the last)
bool is_new_order =
Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/util/content_file_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ template <typename V>
void DropUnselectedColumnStats(std::map<int32_t, V>& map,
const std::unordered_set<int32_t>& columns) {
for (auto it = map.begin(); it != map.end();) {
if (columns.find(it->first) == columns.end()) {
if (!columns.contains(it->first)) {
it = map.erase(it);
} else {
++it;
Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/util/struct_like_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ Result<bool> StructLikeSet<kValidate>::Contains(const StructLike& row) const {
if constexpr (kValidate) {
ICEBERG_RETURN_UNEXPECTED(ValidateRowAgainstTypes(row, field_types_));
}
return set_.find(row) != set_.end();
return set_.contains(row);
}

template <bool kValidate>
Expand Down
Loading