shangxinli commented on code in PR #1012:
URL: https://github.com/apache/iceberg-cpp/pull/1012#discussion_r4328473800
##########
src/iceberg/table_metadata.cc:
##########
@@ -1006,6 +1006,9 @@ Status TableMetadataBuilder::Impl::RemoveSchemas(
return !schema_ids.contains(schema->schema_id());
}) |
std::ranges::to<std::vector<std::shared_ptr<Schema>>>();
+ for (const auto schema_id : schema_ids) {
+ schemas_by_id_.erase(schema_id);
Review Comment:
Worth calling out in the description that this departs from Java -
TableMetadata.java lines 1169 to 1183 leaves schemasById untouched on
removeSchemas, so there setCurrentSchema on a removed id still succeeds and
emits a dangling currentSchemaId. The behavior here looks right to me, and the
Java side is arguably a bug worth filing upstream.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]