Skip to content

Commit 4374df6

Browse files
author
xiao.dong
committed
fix comment
1 parent 39be1a9 commit 4374df6

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

src/iceberg/test/expire_snapshots_test.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ TEST_F(ExpireSnapshotsTest, Empty) {
3434
EXPECT_THAT(result.snapshot_ids_to_remove.size(), 1);
3535
EXPECT_THAT(result.snapshot_ids_to_remove.at(0), 3051729675574597004);
3636
EXPECT_THAT(result.ref_to_remove.empty(), true);
37-
EXPECT_THAT(result.schema_to_remove.empty(), true);
38-
EXPECT_THAT(result.partition_spec_to_remove.empty(), true);
37+
EXPECT_THAT(result.schema_ids_to_remove.empty(), true);
38+
EXPECT_THAT(result.partition_spec_ids_to_remove.empty(), true);
3939
}
4040

4141
TEST_F(ExpireSnapshotsTest, Keep2) {
@@ -44,8 +44,8 @@ TEST_F(ExpireSnapshotsTest, Keep2) {
4444
ICEBERG_UNWRAP_OR_FAIL(auto result, update->Apply());
4545
EXPECT_THAT(result.snapshot_ids_to_remove.empty(), true);
4646
EXPECT_THAT(result.ref_to_remove.empty(), true);
47-
EXPECT_THAT(result.schema_to_remove.empty(), true);
48-
EXPECT_THAT(result.partition_spec_to_remove.empty(), true);
47+
EXPECT_THAT(result.schema_ids_to_remove.empty(), true);
48+
EXPECT_THAT(result.partition_spec_ids_to_remove.empty(), true);
4949
}
5050

5151
TEST_F(ExpireSnapshotsTest, ExpireById) {
@@ -56,8 +56,8 @@ TEST_F(ExpireSnapshotsTest, ExpireById) {
5656
EXPECT_THAT(result.snapshot_ids_to_remove.size(), 1);
5757
EXPECT_THAT(result.snapshot_ids_to_remove.at(0), 3051729675574597004);
5858
EXPECT_THAT(result.ref_to_remove.empty(), true);
59-
EXPECT_THAT(result.schema_to_remove.empty(), true);
60-
EXPECT_THAT(result.partition_spec_to_remove.empty(), true);
59+
EXPECT_THAT(result.schema_ids_to_remove.empty(), true);
60+
EXPECT_THAT(result.partition_spec_ids_to_remove.empty(), true);
6161
}
6262

6363
TEST_F(ExpireSnapshotsTest, ExpireByIdNotExist) {
@@ -76,8 +76,8 @@ TEST_F(ExpireSnapshotsTest, ExpireOlderThan1) {
7676
ICEBERG_UNWRAP_OR_FAIL(auto result, update->Apply());
7777
EXPECT_THAT(result.snapshot_ids_to_remove.empty(), true);
7878
EXPECT_THAT(result.ref_to_remove.empty(), true);
79-
EXPECT_THAT(result.schema_to_remove.empty(), true);
80-
EXPECT_THAT(result.partition_spec_to_remove.empty(), true);
79+
EXPECT_THAT(result.schema_ids_to_remove.empty(), true);
80+
EXPECT_THAT(result.partition_spec_ids_to_remove.empty(), true);
8181
}
8282

8383
TEST_F(ExpireSnapshotsTest, ExpireOlderThan2) {
@@ -87,8 +87,8 @@ TEST_F(ExpireSnapshotsTest, ExpireOlderThan2) {
8787
EXPECT_THAT(result.snapshot_ids_to_remove.size(), 1);
8888
EXPECT_THAT(result.snapshot_ids_to_remove.at(0), 3051729675574597004);
8989
EXPECT_THAT(result.ref_to_remove.empty(), true);
90-
EXPECT_THAT(result.schema_to_remove.empty(), true);
91-
EXPECT_THAT(result.partition_spec_to_remove.empty(), true);
90+
EXPECT_THAT(result.schema_ids_to_remove.empty(), true);
91+
EXPECT_THAT(result.partition_spec_ids_to_remove.empty(), true);
9292
}
9393

9494
} // namespace iceberg

src/iceberg/transaction.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,12 @@ Status Transaction::Apply(PendingUpdate& update) {
170170
if (!result.snapshot_ids_to_remove.empty()) {
171171
metadata_builder_->RemoveSnapshots(std::move(result.snapshot_ids_to_remove));
172172
}
173-
if (!result.partition_spec_to_remove.empty()) {
173+
if (!result.partition_spec_ids_to_remove.empty()) {
174174
metadata_builder_->RemovePartitionSpecs(
175-
std::move(result.partition_spec_to_remove));
175+
std::move(result.partition_spec_ids_to_remove));
176176
}
177-
if (!result.schema_to_remove.empty()) {
178-
metadata_builder_->RemoveSchemas(std::move(result.schema_to_remove));
177+
if (!result.schema_ids_to_remove.empty()) {
178+
metadata_builder_->RemoveSchemas(std::move(result.schema_ids_to_remove));
179179
}
180180
} break;
181181
default:

src/iceberg/update/expire_snapshots.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ Result<ExpireSnapshots::ExpireSnapshotsResult> ExpireSnapshots::Apply() {
284284
}
285285
return ExpireSnapshotsResult{.ref_to_remove = std::move(refs_to_remove),
286286
.snapshot_ids_to_remove = snapshot_ids_to_expire_,
287-
.partition_spec_to_remove = std::move(specs_to_remove),
288-
.schema_to_remove = std::move(schemas_to_remove)};
287+
.partition_spec_ids_to_remove = std::move(specs_to_remove),
288+
.schema_ids_to_remove = std::move(schemas_to_remove)};
289289
}
290290

291291
Status ExpireSnapshots::Commit() {

src/iceberg/update/expire_snapshots.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ class ICEBERG_EXPORT ExpireSnapshots : public PendingUpdate {
7373
struct ExpireSnapshotsResult {
7474
SnapshotToRef ref_to_remove;
7575
std::vector<int64_t> snapshot_ids_to_remove;
76-
std::vector<int32_t> partition_spec_to_remove;
77-
std::unordered_set<int32_t> schema_to_remove;
76+
std::vector<int32_t> partition_spec_ids_to_remove;
77+
std::unordered_set<int32_t> schema_ids_to_remove;
7878
};
7979

8080
/// \brief Expires a specific Snapshot identified by id.

0 commit comments

Comments
 (0)