This is an automated email from the ASF dual-hosted git repository.

nastra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 72c18ed57a Core: Accept manifest format version >= 4 in manifest info 
(#18436)
72c18ed57a is described below

commit 72c18ed57a1851f650eb8932732f1647e31ba4d8
Author: Anoop Johnson <[email protected]>
AuthorDate: Mon Oct 12 00:25:29 2026 -0700

    Core: Accept manifest format version >= 4 in manifest info (#18436)
    
    Relax the manifest_info format_version validation
     so the writer accepts V4 and any future format version
    rather than rejecting versions it doesn't yet know about.
---
 core/src/main/java/org/apache/iceberg/ManifestInfoStruct.java     | 2 +-
 core/src/test/java/org/apache/iceberg/TestManifestInfoStruct.java | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/src/main/java/org/apache/iceberg/ManifestInfoStruct.java 
b/core/src/main/java/org/apache/iceberg/ManifestInfoStruct.java
index bc5765a855..2184357168 100644
--- a/core/src/main/java/org/apache/iceberg/ManifestInfoStruct.java
+++ b/core/src/main/java/org/apache/iceberg/ManifestInfoStruct.java
@@ -395,7 +395,7 @@ class ManifestInfoStruct extends SupportsIndexProjection 
implements ManifestInfo
 
     Builder formatVersion(int version) {
       Preconditions.checkArgument(
-          version == 0 || version == 4, "Invalid format version: %s (must be 0 
or 4)", version);
+          version == 0 || version >= 4, "Invalid format version: %s (must be 0 
or >= 4)", version);
       this.formatVersion = version;
       return this;
     }
diff --git a/core/src/test/java/org/apache/iceberg/TestManifestInfoStruct.java 
b/core/src/test/java/org/apache/iceberg/TestManifestInfoStruct.java
index b1363249bb..bde654ea9a 100644
--- a/core/src/test/java/org/apache/iceberg/TestManifestInfoStruct.java
+++ b/core/src/test/java/org/apache/iceberg/TestManifestInfoStruct.java
@@ -706,15 +706,15 @@ class TestManifestInfoStruct {
   }
 
   @ParameterizedTest
-  @ValueSource(ints = {-1, 1, 2, 3, 5})
+  @ValueSource(ints = {-1, 1, 2, 3})
   void builderRejectsUndefinedFormatVersion(int version) {
     assertThatThrownBy(() -> 
ManifestInfoStruct.builder().formatVersion(version))
         .isInstanceOf(IllegalArgumentException.class)
-        .hasMessage("Invalid format version: " + version + " (must be 0 or 
4)");
+        .hasMessage("Invalid format version: " + version + " (must be 0 or >= 
4)");
   }
 
   @ParameterizedTest
-  @ValueSource(ints = {0, 4})
+  @ValueSource(ints = {0, 4, 5})
   void builderAcceptsValidFormatVersion(int version) {
     ManifestInfoStruct info =
         ManifestInfoStruct.builder()

Reply via email to