nastra commented on code in PR #12821: URL: https://github.com/apache/iceberg/pull/12821#discussion_r2059709592
########## core/src/main/java/org/apache/iceberg/view/ViewMetadata.java: ########## @@ -249,9 +249,17 @@ public Builder setCurrentVersionId(int newVersionId) { changes.add(new MetadataUpdate.SetCurrentViewVersion(newVersionId)); } + // Use the timestamp from the view version if it was added in current set of changes. + // Otherwise, use the current system time. This handles cases where the view version + // was set as current in the past and is being re-activated. + boolean versionAddedInThisChange = + changes(MetadataUpdate.AddViewVersion.class) + .anyMatch(added -> added.viewVersion().versionId() == newVersionId); + this.historyEntry = ImmutableViewHistoryEntry.builder() - .timestampMillis(version.timestampMillis()) + .timestampMillis( Review Comment: thanks for the input here @rdblue -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org