Skip to content

Commit 5bf6ab3

Browse files
committed
1
1 parent bb2bb45 commit 5bf6ab3

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/iceberg/transaction.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@ Status Transaction::Apply(PendingUpdate& update) {
200200
metadata_builder_->AssignUUID();
201201
}
202202
} break;
203+
case PendingUpdate::Kind::kUpdateStatistics: {
204+
auto& update_statistics = internal::checked_cast<UpdateStatistics&>(update);
205+
ICEBERG_ASSIGN_OR_RAISE(auto result, update_statistics.Apply());
206+
for (auto&& [_, stat_file] : result.to_set) {
207+
metadata_builder_->SetStatistics(std::move(stat_file));
208+
}
209+
for (const auto& snapshot_id : result.to_remove) {
210+
metadata_builder_->RemoveStatistics(snapshot_id);
211+
}
212+
} break;
203213
default:
204214
return NotSupported("Unsupported pending update: {}",
205215
static_cast<int32_t>(update.kind()));

0 commit comments

Comments
 (0)