amogh-jahagirdar commented on code in PR #11819:
URL: https://github.com/apache/iceberg/pull/11819#discussion_r1891027757
##########
core/src/main/java/org/apache/iceberg/MetadataUpdate.java:
##########
@@ -338,7 +338,11 @@ public String name() {
@Override
public void applyTo(TableMetadata.Builder metadataBuilder) {
- metadataBuilder.removeRef(refName);
+ if (refName.equals(SnapshotRef.MAIN_BRANCH)) {
+ metadataBuilder.resetMainBranch();
+ } else {
+ metadataBuilder.removeRef(refName);
+ }
Review Comment:
Yeah at this point we may as well make TableMetadata.removeRef not clear the
log if it's main, and just have the consistent behavior for resetting to main.
I feel like that's the sane default for that API now but the only issue is if
others depend on that behavior
--
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]