rdblue commented on code in PR #4071: URL: https://github.com/apache/iceberg/pull/4071#discussion_r841292053
########## core/src/main/java/org/apache/iceberg/MetadataUpdate.java: ########## @@ -223,31 +225,106 @@ public String name() { @Override public void applyTo(TableMetadata.Builder metadataBuilder) { - // TODO: this should be generalized when tagging is supported - metadataBuilder.removeBranch(name); + SnapshotRef ref = metadataBuilder.ref(name); + ValidationException.check(ref != null, "Ref %s not found", name); Review Comment: I think this should be idempotent. If there is no ref, then that's okay. -- 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: dev-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org