rdblue commented on code in PR #4922:
URL: https://github.com/apache/iceberg/pull/4922#discussion_r886265832


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -529,6 +531,7 @@ public TableMetadata replaceProperties(Map<String, String> 
rawProperties) {
 
     return new Builder(this)
         .setProperties(updated)
+        .setRef(SnapshotRef.MAIN_BRANCH, 
SnapshotRef.branchBuilder(currentSnapshotId).build())

Review Comment:
   I don't think it is a good idea to overwrite the main branch anywhere. If 
there are no refs, but there is a current snapshot, then the builder should 
produce a main branch. I think that's the only place where this logic should be 
handled.



-- 
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]

Reply via email to