nastra commented on code in PR #8147:
URL: https://github.com/apache/iceberg/pull/8147#discussion_r1280397366


##########
core/src/main/java/org/apache/iceberg/view/ViewMetadata.java:
##########
@@ -121,9 +128,178 @@ default ViewMetadata checkAndNormalize() {
           versions().subList(versions().size() - versionHistorySizeToKeep, 
versions().size());
       List<ViewHistoryEntry> history =
           history().subList(history().size() - versionHistorySizeToKeep, 
history().size());
-      return 
ImmutableViewMetadata.builder().from(this).versions(versions).history(history).build();
+      return ViewMetadata.buildFrom(this)
+          .discardChanges()
+          .versions(versions)
+          .history(history)
+          .build();
     }
 
     return this;
   }
+
+  static Builder builder() {
+    return new Builder();
+  }
+
+  static Builder buildFrom(ViewMetadata base) {
+    return new Builder(base);
+  }
+
+  class Builder {
+    private int formatVersion = 1;

Review Comment:
   done



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