File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ Result<PendingUpdate::ApplyResult> UpdateProperties::Apply() {
7474 ICEBERG_RETURN_UNEXPECTED (CheckErrors ());
7575 const auto & current_props = transaction_->current ().properties .configs ();
7676 std::unordered_map<std::string, std::string> new_properties;
77+ std::vector<std::string> removals;
7778 for (const auto & [key, value] : current_props) {
7879 if (!removals_.contains (key)) {
7980 new_properties[key] = value;
@@ -116,15 +117,13 @@ Result<PendingUpdate::ApplyResult> UpdateProperties::Apply() {
116117 result.updates .emplace_back (std::make_unique<table::SetProperties>(updates_));
117118 }
118119 if (!removals_.empty ()) {
119- std::vector<std::string> existing_removals;
120120 for (const auto & key : removals_) {
121121 if (current_props.contains (key)) {
122- existing_removals .push_back (key);
122+ removals .push_back (key);
123123 }
124124 }
125- if (!existing_removals.empty ()) {
126- result.updates .emplace_back (
127- std::make_unique<table::RemoveProperties>(existing_removals));
125+ if (!removals.empty ()) {
126+ result.updates .emplace_back (std::make_unique<table::RemoveProperties>(removals));
128127 }
129128 }
130129 if (format_version_.has_value ()) {
You can’t perform that action at this time.
0 commit comments