You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/01 23:55:45 UTC

[GitHub] [iceberg] amogh-jahagirdar commented on a diff in pull request #4922: Core: Assign main branch to table's current snapshot if there is no main but there is a current table state

amogh-jahagirdar commented on code in PR #4922:
URL: https://github.com/apache/iceberg/pull/4922#discussion_r887388996


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1187,6 +1192,20 @@ public TableMetadata build() {
           previousFiles, previousFileLocation, base.lastUpdatedMillis(), properties);
       List<HistoryEntry> newSnapshotLog = updateSnapshotLog(snapshotLog, snapshotsById, currentSnapshotId, changes);
 
+      if (refs.isEmpty() && currentSnapshotId != -1) {

Review Comment:
   Will add tests for this if we deem setting main here is the right way to go



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org