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

rdblue 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 5d4c8ce217 Core: Remove unused v4 implementation, disable tests 
(#19021)
5d4c8ce217 is described below

commit 5d4c8ce21703a8f007d7d76b92f35f5ef2b65f48
Author: Ryan Blue <[email protected]>
AuthorDate: Wed Nov 18 14:01:40 2026 -0800

    Core: Remove unused v4 implementation, disable tests (#19021)
---
 .../java/org/apache/iceberg/ManifestFiles.java     |   5 -
 .../org/apache/iceberg/ManifestListWriter.java     |  60 ---
 .../java/org/apache/iceberg/ManifestLists.java     |   8 -
 .../java/org/apache/iceberg/ManifestWriter.java    |  86 ----
 .../main/java/org/apache/iceberg/V4Metadata.java   | 516 ---------------------
 .../apache/iceberg/DeleteFileIndexTestBase.java    |   2 +-
 .../iceberg/PartitionStatsHandlerTestBase.java     |   2 +-
 .../iceberg/ScanPlanningAndReportingTestBase.java  |   2 +-
 .../src/test/java/org/apache/iceberg/TestBase.java |   7 +-
 .../org/apache/iceberg/TestCommitReporting.java    |   2 +-
 .../java/org/apache/iceberg/TestDeleteFiles.java   |   2 +-
 .../org/apache/iceberg/TestLocalFilterFiles.java   |   4 +-
 .../apache/iceberg/TestManifestListVersions.java   |   2 +-
 .../apache/iceberg/TestManifestWriterVersions.java | 102 +---
 .../java/org/apache/iceberg/TestMergeAppend.java   |   2 +-
 .../apache/iceberg/TestMetadataTableFilters.java   |   2 +-
 .../java/org/apache/iceberg/TestOverwrite.java     |   2 +-
 .../iceberg/TestOverwriteWithValidation.java       |   2 +-
 .../org/apache/iceberg/TestRemoveSnapshots.java    |   4 +-
 .../org/apache/iceberg/TestRemoveSnapshotsV4.java  |   4 +-
 .../org/apache/iceberg/TestReplacePartitions.java  |   2 +-
 .../java/org/apache/iceberg/TestRewriteFiles.java  |   2 +-
 .../test/java/org/apache/iceberg/TestRowDelta.java |   2 +-
 .../org/apache/iceberg/TestRowLineageMetadata.java |   2 +-
 .../iceberg/TestScansAndSchemaEvolution.java       |   4 +-
 .../test/java/org/apache/iceberg/TestTables.java   |   2 +-
 .../TestRemoveDanglingDeleteFilesAction.java       |   2 +-
 .../apache/iceberg/util/TestManifestFileUtil.java  |   8 +-
 .../java/org/apache/iceberg/io/TestDVWriters.java  |   2 +-
 .../iceberg/io/TestTaskEqualityDeltaWriter.java    |   2 +-
 .../org/apache/iceberg/flink/TestFlinkUpsert.java  |   2 +-
 .../iceberg/flink/sink/TestDeltaTaskWriter.java    |   2 +-
 .../iceberg/flink/sink/TestIcebergCommitter.java   |   2 +-
 .../org/apache/iceberg/flink/TestFlinkUpsert.java  |   2 +-
 .../iceberg/flink/sink/TestDeltaTaskWriter.java    |   2 +-
 .../iceberg/flink/sink/TestIcebergCommitter.java   |   2 +-
 .../org/apache/iceberg/flink/TestFlinkUpsert.java  |   2 +-
 .../iceberg/flink/sink/TestDeltaTaskWriter.java    |   2 +-
 .../iceberg/flink/sink/TestIcebergCommitter.java   |   2 +-
 .../actions/TestDeleteReachableFilesAction.java    |   2 +-
 .../spark/actions/TestExpireSnapshotsAction.java   |   2 +-
 .../spark/actions/TestExpireSnapshotsActionV4.java | 152 ------
 .../spark/actions/TestRemoveOrphanFilesAction.java |   2 +-
 .../spark/actions/TestRewriteDataFilesAction.java  |   2 +-
 .../spark/actions/TestRewriteTablePathsAction.java |   2 +-
 .../spark/source/TestPositionDeletesReader.java    |   2 +-
 .../spark/source/TestSparkMetadataColumns.java     |   2 +-
 .../spark/source/TestSparkReaderDeletes.java       |   2 +-
 .../actions/TestDeleteReachableFilesAction.java    |   2 +-
 .../spark/actions/TestExpireSnapshotsAction.java   |   2 +-
 .../spark/actions/TestExpireSnapshotsActionV4.java | 152 ------
 .../spark/actions/TestRemoveOrphanFilesAction.java |   2 +-
 .../spark/actions/TestRewriteDataFilesAction.java  |   2 +-
 .../spark/actions/TestRewriteTablePathsAction.java |   2 +-
 .../spark/source/TestPositionDeletesReader.java    |   2 +-
 .../spark/source/TestSparkMetadataColumns.java     |   2 +-
 .../spark/source/TestSparkReaderDeletes.java       |   2 +-
 .../actions/TestDeleteReachableFilesAction.java    |   2 +-
 .../spark/actions/TestExpireSnapshotsAction.java   |   2 +-
 .../spark/actions/TestExpireSnapshotsActionV4.java | 152 ------
 .../spark/actions/TestRemoveOrphanFilesAction.java |   2 +-
 .../spark/actions/TestRewriteDataFilesAction.java  |   2 +-
 .../spark/actions/TestRewriteTablePathsAction.java |   2 +-
 .../spark/source/TestPositionDeletesReader.java    |   2 +-
 .../spark/source/TestSparkMetadataColumns.java     |   2 +-
 .../spark/source/TestSparkReaderDeletes.java       |   2 +-
 .../apache/iceberg/spark/sql/TestDeleteFrom.java   |   2 +-
 .../actions/TestDeleteReachableFilesAction.java    |   2 +-
 .../spark/actions/TestExpireSnapshotsAction.java   |   2 +-
 .../spark/actions/TestExpireSnapshotsActionV4.java | 152 ------
 .../spark/actions/TestRemoveOrphanFilesAction.java |   2 +-
 .../spark/actions/TestRewriteDataFilesAction.java  |   2 +-
 .../spark/actions/TestRewriteTablePathsAction.java |   2 +-
 .../spark/source/TestPositionDeletesReader.java    |   2 +-
 .../spark/source/TestSparkMetadataColumns.java     |   2 +-
 .../spark/source/TestSparkReaderDeletes.java       |   2 +-
 .../apache/iceberg/spark/sql/TestDeleteFrom.java   |   2 +-
 77 files changed, 79 insertions(+), 1459 deletions(-)

diff --git a/core/src/main/java/org/apache/iceberg/ManifestFiles.java 
b/core/src/main/java/org/apache/iceberg/ManifestFiles.java
index 0ec3af901d..d54fa4a98a 100644
--- a/core/src/main/java/org/apache/iceberg/ManifestFiles.java
+++ b/core/src/main/java/org/apache/iceberg/ManifestFiles.java
@@ -277,9 +277,6 @@ public class ManifestFiles {
       case 3:
         return new ManifestWriter.V3Writer(
             spec, encryptedOutputFile, snapshotId, firstRowId, 
writerProperties);
-      case 4:
-        return new ManifestWriter.V4Writer(
-            spec, encryptedOutputFile, snapshotId, firstRowId, 
writerProperties);
     }
     throw new UnsupportedOperationException(
         "Cannot write manifest for table version: " + formatVersion);
@@ -381,8 +378,6 @@ public class ManifestFiles {
         return new ManifestWriter.V2DeleteWriter(spec, outputFile, snapshotId, 
writerProperties);
       case 3:
         return new ManifestWriter.V3DeleteWriter(spec, outputFile, snapshotId, 
writerProperties);
-      case 4:
-        return new ManifestWriter.V4DeleteWriter(spec, outputFile, snapshotId, 
writerProperties);
     }
     throw new UnsupportedOperationException(
         "Cannot write manifest for table version: " + formatVersion);
diff --git a/core/src/main/java/org/apache/iceberg/ManifestListWriter.java 
b/core/src/main/java/org/apache/iceberg/ManifestListWriter.java
index 2edcf80ae4..13f6cd5255 100644
--- a/core/src/main/java/org/apache/iceberg/ManifestListWriter.java
+++ b/core/src/main/java/org/apache/iceberg/ManifestListWriter.java
@@ -110,66 +110,6 @@ abstract class ManifestListWriter implements 
FileAppender<ManifestFile> {
     return encryptionKeys;
   }
 
-  static class V4Writer extends ManifestListWriter {
-    private final V4Metadata.ManifestFileWrapper wrapper;
-    private Long nextRowId;
-
-    V4Writer(
-        OutputFile snapshotFile,
-        EncryptionManager encryptionManager,
-        long snapshotId,
-        Long parentSnapshotId,
-        long sequenceNumber,
-        long firstRowId) {
-      super(
-          snapshotFile,
-          encryptionManager,
-          ImmutableMap.of(
-              "snapshot-id", String.valueOf(snapshotId),
-              "parent-snapshot-id", String.valueOf(parentSnapshotId),
-              "sequence-number", String.valueOf(sequenceNumber),
-              "first-row-id", String.valueOf(firstRowId),
-              "format-version", "4"));
-      this.wrapper = new V4Metadata.ManifestFileWrapper(snapshotId, 
sequenceNumber);
-      this.nextRowId = firstRowId;
-    }
-
-    @Override
-    protected ManifestFile prepare(ManifestFile manifest) {
-      if (manifest.content() != ManifestContent.DATA || manifest.firstRowId() 
!= null) {
-        return wrapper.wrap(manifest, null);
-      } else {
-        // assign first-row-id and update the next to assign
-        wrapper.wrap(manifest, nextRowId);
-        // leave space for existing and added rows, in case any of the 
existing data files do not
-        // have an assigned first-row-id (this is the case with manifests from 
pre-v3 snapshots)
-        this.nextRowId += manifest.existingRowsCount() + 
manifest.addedRowsCount();
-        return wrapper;
-      }
-    }
-
-    @Override
-    protected FileAppender<ManifestFile> newAppender(OutputFile file, 
Map<String, String> meta) {
-      try {
-        return InternalData.write(FileFormat.AVRO, file)
-            .schema(V4Metadata.MANIFEST_LIST_SCHEMA)
-            .named("manifest_file")
-            .meta(meta)
-            .overwrite()
-            .build();
-
-      } catch (IOException e) {
-        throw new RuntimeIOException(
-            e, "Failed to create snapshot list writer for path: %s", 
file.location());
-      }
-    }
-
-    @Override
-    public Long nextRowId() {
-      return nextRowId;
-    }
-  }
-
   static class V3Writer extends ManifestListWriter {
     private final V3Metadata.ManifestFileWrapper wrapper;
     private Long nextRowId;
diff --git a/core/src/main/java/org/apache/iceberg/ManifestLists.java 
b/core/src/main/java/org/apache/iceberg/ManifestLists.java
index dbe080584b..50d795d6cd 100644
--- a/core/src/main/java/org/apache/iceberg/ManifestLists.java
+++ b/core/src/main/java/org/apache/iceberg/ManifestLists.java
@@ -85,14 +85,6 @@ class ManifestLists {
             parentSnapshotId,
             sequenceNumber,
             firstRowId);
-      case 4:
-        return new ManifestListWriter.V4Writer(
-            manifestListFile,
-            encryptionManager,
-            snapshotId,
-            parentSnapshotId,
-            sequenceNumber,
-            firstRowId);
     }
     throw new UnsupportedOperationException(
         "Cannot write manifest list for table version: " + formatVersion);
diff --git a/core/src/main/java/org/apache/iceberg/ManifestWriter.java 
b/core/src/main/java/org/apache/iceberg/ManifestWriter.java
index 321bcd89d8..4691e7670d 100644
--- a/core/src/main/java/org/apache/iceberg/ManifestWriter.java
+++ b/core/src/main/java/org/apache/iceberg/ManifestWriter.java
@@ -268,92 +268,6 @@ public abstract class ManifestWriter<F extends 
ContentFile<F>> implements FileAp
     writer.close();
   }
 
-  static class V4Writer extends ManifestWriter<DataFile> {
-    private final V4Metadata.ManifestEntryWrapper<DataFile> entryWrapper;
-
-    V4Writer(
-        PartitionSpec spec,
-        EncryptedOutputFile file,
-        Long snapshotId,
-        Long firstRowId,
-        Map<String, String> writerProperties) {
-      super(spec, file, snapshotId, firstRowId, writerProperties);
-      this.entryWrapper = new V4Metadata.ManifestEntryWrapper<>(snapshotId, 
spec.partitionType());
-    }
-
-    @Override
-    protected ManifestEntry<DataFile> prepare(ManifestEntry<DataFile> entry) {
-      return entryWrapper.wrap(entry);
-    }
-
-    @Override
-    protected FileAppender<ManifestEntry<DataFile>> newAppender(
-        PartitionSpec spec, OutputFile file) {
-      Schema manifestSchema = V4Metadata.entrySchema(spec.partitionType());
-      try {
-        return InternalData.write(format(), file)
-            .schema(manifestSchema)
-            .named("manifest_entry")
-            .meta("schema", SchemaParser.toJson(spec.schema()))
-            .meta("partition-spec", PartitionSpecParser.toJsonFields(spec))
-            .meta("partition-spec-id", String.valueOf(spec.specId()))
-            .meta("format-version", "4")
-            .meta("content", "data")
-            .set(writerProperties())
-            .overwrite()
-            .build();
-      } catch (IOException e) {
-        throw new RuntimeIOException(
-            e, "Failed to create manifest writer for path: %s", 
file.location());
-      }
-    }
-  }
-
-  static class V4DeleteWriter extends ManifestWriter<DeleteFile> {
-    private final V4Metadata.ManifestEntryWrapper<DeleteFile> entryWrapper;
-
-    V4DeleteWriter(
-        PartitionSpec spec,
-        EncryptedOutputFile file,
-        Long snapshotId,
-        Map<String, String> writerProperties) {
-      super(spec, file, snapshotId, null, writerProperties);
-      this.entryWrapper = new V4Metadata.ManifestEntryWrapper<>(snapshotId, 
spec.partitionType());
-    }
-
-    @Override
-    protected ManifestEntry<DeleteFile> prepare(ManifestEntry<DeleteFile> 
entry) {
-      return entryWrapper.wrap(entry);
-    }
-
-    @Override
-    protected FileAppender<ManifestEntry<DeleteFile>> newAppender(
-        PartitionSpec spec, OutputFile file) {
-      Schema manifestSchema = V4Metadata.entrySchema(spec.partitionType());
-      try {
-        return InternalData.write(format(), file)
-            .schema(manifestSchema)
-            .named("manifest_entry")
-            .meta("schema", SchemaParser.toJson(spec.schema()))
-            .meta("partition-spec", PartitionSpecParser.toJsonFields(spec))
-            .meta("partition-spec-id", String.valueOf(spec.specId()))
-            .meta("format-version", "4")
-            .meta("content", "deletes")
-            .set(writerProperties())
-            .overwrite()
-            .build();
-      } catch (IOException e) {
-        throw new RuntimeIOException(
-            e, "Failed to create manifest writer for path: %s", 
file.location());
-      }
-    }
-
-    @Override
-    protected ManifestContent content() {
-      return ManifestContent.DELETES;
-    }
-  }
-
   static class V3Writer extends ManifestWriter<DataFile> {
     private final V3Metadata.ManifestEntryWrapper<DataFile> entryWrapper;
 
diff --git a/core/src/main/java/org/apache/iceberg/V4Metadata.java 
b/core/src/main/java/org/apache/iceberg/V4Metadata.java
index 909a9b3b93..cba9c02abc 100644
--- a/core/src/main/java/org/apache/iceberg/V4Metadata.java
+++ b/core/src/main/java/org/apache/iceberg/V4Metadata.java
@@ -18,13 +18,10 @@
  */
 package org.apache.iceberg;
 
-import static org.apache.iceberg.types.Types.NestedField.required;
-
 import java.nio.ByteBuffer;
 import java.util.List;
 import java.util.Map;
 import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
-import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
 import org.apache.iceberg.relocated.com.google.common.collect.Lists;
 import org.apache.iceberg.relocated.com.google.common.collect.Maps;
 import org.apache.iceberg.types.Types;
@@ -33,519 +30,6 @@ import org.apache.iceberg.util.StructProjection;
 class V4Metadata {
   private V4Metadata() {}
 
-  static final Schema MANIFEST_LIST_SCHEMA =
-      new Schema(
-          ManifestFile.PATH,
-          ManifestFile.LENGTH,
-          ManifestFile.SPEC_ID,
-          ManifestFile.MANIFEST_CONTENT.asRequired(),
-          ManifestFile.SEQUENCE_NUMBER.asRequired(),
-          ManifestFile.MIN_SEQUENCE_NUMBER.asRequired(),
-          ManifestFile.SNAPSHOT_ID,
-          ManifestFile.ADDED_FILES_COUNT.asRequired(),
-          ManifestFile.EXISTING_FILES_COUNT.asRequired(),
-          ManifestFile.DELETED_FILES_COUNT.asRequired(),
-          ManifestFile.ADDED_ROWS_COUNT.asRequired(),
-          ManifestFile.EXISTING_ROWS_COUNT.asRequired(),
-          ManifestFile.DELETED_ROWS_COUNT.asRequired(),
-          ManifestFile.PARTITION_SUMMARIES,
-          ManifestFile.KEY_METADATA,
-          ManifestFile.FIRST_ROW_ID);
-
-  /**
-   * A wrapper class to write any ManifestFile implementation to Avro using 
the v4 write schema.
-   *
-   * <p>This is used to maintain compatibility with v4 by writing manifest 
list files with the old
-   * schema, instead of writing a sequence number into metadata files in v4 
tables.
-   */
-  static class ManifestFileWrapper implements ManifestFile, StructLike {
-    private final long commitSnapshotId;
-    private final long sequenceNumber;
-    private ManifestFile wrapped = null;
-    private Long wrappedFirstRowId = null;
-
-    ManifestFileWrapper(long commitSnapshotId, long sequenceNumber) {
-      this.commitSnapshotId = commitSnapshotId;
-      this.sequenceNumber = sequenceNumber;
-    }
-
-    public ManifestFile wrap(ManifestFile file, Long firstRowId) {
-      this.wrapped = file;
-      this.wrappedFirstRowId = firstRowId;
-      return this;
-    }
-
-    @Override
-    public int size() {
-      return MANIFEST_LIST_SCHEMA.columns().size();
-    }
-
-    @Override
-    public <T> void set(int pos, T value) {
-      throw new UnsupportedOperationException("Cannot modify 
ManifestFileWrapper wrapper via set");
-    }
-
-    @Override
-    public <T> T get(int pos, Class<T> javaClass) {
-      return javaClass.cast(get(pos));
-    }
-
-    private Object get(int pos) {
-      switch (pos) {
-        case 0:
-          return wrapped.path();
-        case 1:
-          return wrapped.length();
-        case 2:
-          return wrapped.partitionSpecId();
-        case 3:
-          return wrapped.content().id();
-        case 4:
-          if (wrapped.sequenceNumber() == ManifestWriter.UNASSIGNED_SEQ) {
-            // if the sequence number is being assigned here, then the 
manifest must be created by
-            // the current
-            // operation. to validate this, check that the snapshot id matches 
the current commit
-            Preconditions.checkState(
-                commitSnapshotId == wrapped.snapshotId(),
-                "Found unassigned sequence number for a manifest from 
snapshot: %s",
-                wrapped.snapshotId());
-            return sequenceNumber;
-          } else {
-            return wrapped.sequenceNumber();
-          }
-        case 5:
-          if (wrapped.minSequenceNumber() == ManifestWriter.UNASSIGNED_SEQ) {
-            // same sanity check as above
-            Preconditions.checkState(
-                commitSnapshotId == wrapped.snapshotId(),
-                "Found unassigned sequence number for a manifest from 
snapshot: %s",
-                wrapped.snapshotId());
-            // if the min sequence number is not determined, then there was no 
assigned sequence
-            // number for any file
-            // written to the wrapped manifest. replace the unassigned 
sequence number with the one
-            // for this commit
-            return sequenceNumber;
-          } else {
-            return wrapped.minSequenceNumber();
-          }
-        case 6:
-          return wrapped.snapshotId();
-        case 7:
-          return wrapped.addedFilesCount();
-        case 8:
-          return wrapped.existingFilesCount();
-        case 9:
-          return wrapped.deletedFilesCount();
-        case 10:
-          return wrapped.addedRowsCount();
-        case 11:
-          return wrapped.existingRowsCount();
-        case 12:
-          return wrapped.deletedRowsCount();
-        case 13:
-          return wrapped.partitions();
-        case 14:
-          return wrapped.keyMetadata();
-        case 15:
-          if (wrappedFirstRowId != null) {
-            // if first-row-id is assigned, ensure that it is valid
-            Preconditions.checkState(
-                wrapped.content() == ManifestContent.DATA && 
wrapped.firstRowId() == null,
-                "Found invalid first-row-id assignment: %s",
-                wrapped);
-            return wrappedFirstRowId;
-          } else if (wrapped.content() != ManifestContent.DATA) {
-            return null;
-          } else {
-            Preconditions.checkState(
-                wrapped.firstRowId() != null,
-                "Found unassigned first-row-id for file: " + wrapped.path());
-            return wrapped.firstRowId();
-          }
-        default:
-          throw new UnsupportedOperationException("Unknown field ordinal: " + 
pos);
-      }
-    }
-
-    @Override
-    public String path() {
-      return wrapped.path();
-    }
-
-    @Override
-    public long length() {
-      return wrapped.length();
-    }
-
-    @Override
-    public int partitionSpecId() {
-      return wrapped.partitionSpecId();
-    }
-
-    @Override
-    public ManifestContent content() {
-      return wrapped.content();
-    }
-
-    @Override
-    public long sequenceNumber() {
-      return wrapped.sequenceNumber();
-    }
-
-    @Override
-    public long minSequenceNumber() {
-      return wrapped.minSequenceNumber();
-    }
-
-    @Override
-    public Long snapshotId() {
-      return wrapped.snapshotId();
-    }
-
-    @Override
-    public boolean hasAddedFiles() {
-      return wrapped.hasAddedFiles();
-    }
-
-    @Override
-    public Integer addedFilesCount() {
-      return wrapped.addedFilesCount();
-    }
-
-    @Override
-    public Long addedRowsCount() {
-      return wrapped.addedRowsCount();
-    }
-
-    @Override
-    public boolean hasExistingFiles() {
-      return wrapped.hasExistingFiles();
-    }
-
-    @Override
-    public Integer existingFilesCount() {
-      return wrapped.existingFilesCount();
-    }
-
-    @Override
-    public Long existingRowsCount() {
-      return wrapped.existingRowsCount();
-    }
-
-    @Override
-    public boolean hasDeletedFiles() {
-      return wrapped.hasDeletedFiles();
-    }
-
-    @Override
-    public Integer deletedFilesCount() {
-      return wrapped.deletedFilesCount();
-    }
-
-    @Override
-    public Long deletedRowsCount() {
-      return wrapped.deletedRowsCount();
-    }
-
-    @Override
-    public List<PartitionFieldSummary> partitions() {
-      return wrapped.partitions();
-    }
-
-    @Override
-    public ByteBuffer keyMetadata() {
-      return wrapped.keyMetadata();
-    }
-
-    @Override
-    public Long firstRowId() {
-      return wrapped.firstRowId();
-    }
-
-    @Override
-    public ManifestFile copy() {
-      return wrapped.copy();
-    }
-  }
-
-  static Schema entrySchema(Types.StructType partitionType) {
-    return wrapFileSchema(fileType(partitionType));
-  }
-
-  static Schema wrapFileSchema(Types.StructType fileSchema) {
-    // this is used to build projection schemas
-    return new Schema(
-        ManifestEntry.STATUS,
-        ManifestEntry.SNAPSHOT_ID,
-        ManifestEntry.SEQUENCE_NUMBER,
-        ManifestEntry.FILE_SEQUENCE_NUMBER,
-        required(ManifestEntry.DATA_FILE_ID, "data_file", fileSchema));
-  }
-
-  static Types.StructType fileType(Types.StructType partitionType) {
-    // Parquet cannot represent empty groups, so the partition field is 
omitted entirely from
-    // the file schema for unpartitioned tables. DataFileWrapper adjusts 
positions to match.
-    ImmutableList.Builder<Types.NestedField> fields =
-        ImmutableList.builderWithExpectedSize(partitionType.fields().isEmpty() 
? 18 : 19);
-    fields.add(DataFile.CONTENT.asRequired());
-    fields.add(DataFile.FILE_PATH);
-    fields.add(DataFile.FILE_FORMAT);
-    if (!partitionType.fields().isEmpty()) {
-      fields.add(
-          required(
-              DataFile.PARTITION_ID,
-              DataFile.PARTITION_NAME,
-              partitionType,
-              DataFile.PARTITION_DOC));
-    }
-    fields.add(DataFile.RECORD_COUNT);
-    fields.add(DataFile.FILE_SIZE);
-    fields.add(DataFile.COLUMN_SIZES);
-    fields.add(DataFile.VALUE_COUNTS);
-    fields.add(DataFile.NULL_VALUE_COUNTS);
-    fields.add(DataFile.NAN_VALUE_COUNTS);
-    fields.add(DataFile.LOWER_BOUNDS);
-    fields.add(DataFile.UPPER_BOUNDS);
-    fields.add(DataFile.KEY_METADATA);
-    fields.add(DataFile.SPLIT_OFFSETS);
-    fields.add(DataFile.EQUALITY_IDS);
-    fields.add(DataFile.SORT_ORDER_ID);
-    fields.add(DataFile.FIRST_ROW_ID);
-    fields.add(DataFile.REFERENCED_DATA_FILE);
-    fields.add(DataFile.CONTENT_OFFSET);
-    fields.add(DataFile.CONTENT_SIZE);
-    return Types.StructType.of(fields.build());
-  }
-
-  static class ManifestEntryWrapper<F extends ContentFile<F>>
-      implements ManifestEntry<F>, StructLike {
-    private final int size;
-    private final Long commitSnapshotId;
-    private final DataFileWrapper<?> fileWrapper;
-    private ManifestEntry<F> wrapped = null;
-
-    ManifestEntryWrapper(Long commitSnapshotId, Types.StructType 
partitionType) {
-      this.size = entrySchema(partitionType).columns().size();
-      this.commitSnapshotId = commitSnapshotId;
-      this.fileWrapper = new DataFileWrapper<>(partitionType);
-    }
-
-    public ManifestEntryWrapper<F> wrap(ManifestEntry<F> entry) {
-      this.wrapped = entry;
-      return this;
-    }
-
-    @Override
-    public int size() {
-      return size;
-    }
-
-    @Override
-    public <T> void set(int pos, T value) {
-      throw new UnsupportedOperationException("Cannot modify 
ManifestEntryWrapper wrapper via set");
-    }
-
-    @Override
-    public <T> T get(int pos, Class<T> javaClass) {
-      return javaClass.cast(get(pos));
-    }
-
-    private Object get(int pos) {
-      switch (pos) {
-        case 0:
-          return wrapped.status().id();
-        case 1:
-          return wrapped.snapshotId();
-        case 2:
-          if (wrapped.dataSequenceNumber() == null) {
-            // if the entry's data sequence number is null,
-            // then it will inherit the sequence number of the current commit.
-            // to validate that this is correct, check that the snapshot id is 
either null (will
-            // also be inherited) or that it matches the id of the current 
commit.
-            Preconditions.checkState(
-                wrapped.snapshotId() == null || 
wrapped.snapshotId().equals(commitSnapshotId),
-                "Found unassigned sequence number for an entry from snapshot: 
%s",
-                wrapped.snapshotId());
-
-            // inheritance should work only for ADDED entries
-            Preconditions.checkState(
-                wrapped.status() == Status.ADDED,
-                "Only entries with status ADDED can have null sequence 
number");
-
-            return null;
-          }
-          return wrapped.dataSequenceNumber();
-        case 3:
-          return wrapped.fileSequenceNumber();
-        case 4:
-          return fileWrapper.wrap(wrapped.file());
-        default:
-          throw new UnsupportedOperationException("Unknown field ordinal: " + 
pos);
-      }
-    }
-
-    @Override
-    public Status status() {
-      return wrapped.status();
-    }
-
-    @Override
-    public Long snapshotId() {
-      return wrapped.snapshotId();
-    }
-
-    @Override
-    public void setSnapshotId(long snapshotId) {
-      wrapped.setSnapshotId(snapshotId);
-    }
-
-    @Override
-    public Long dataSequenceNumber() {
-      return wrapped.dataSequenceNumber();
-    }
-
-    @Override
-    public void setDataSequenceNumber(long dataSequenceNumber) {
-      wrapped.setDataSequenceNumber(dataSequenceNumber);
-    }
-
-    @Override
-    public Long fileSequenceNumber() {
-      return wrapped.fileSequenceNumber();
-    }
-
-    @Override
-    public void setFileSequenceNumber(long fileSequenceNumber) {
-      wrapped.setFileSequenceNumber(fileSequenceNumber);
-    }
-
-    @Override
-    public F file() {
-      return wrapped.file();
-    }
-
-    @Override
-    public ManifestEntry<F> copy() {
-      return wrapped.copy();
-    }
-
-    @Override
-    public ManifestEntry<F> copyWithoutStats() {
-      return wrapped.copyWithoutStats();
-    }
-  }
-
-  /** Wrapper used to write DataFile or DeleteFile to v4 metadata. */
-  static class DataFileWrapper<F extends ContentFile<F>> extends 
Delegates.DelegatingContentFile<F>
-      implements ContentFile<F>, StructLike {
-    private static final int PARTITION_POSITION = 3;
-
-    private final int size;
-    private final boolean hasPartition;
-
-    DataFileWrapper(Types.StructType partitionType) {
-      super(null);
-      this.hasPartition = !partitionType.fields().isEmpty();
-      this.size = fileType(partitionType).fields().size();
-    }
-
-    @SuppressWarnings("unchecked")
-    DataFileWrapper<F> wrap(ContentFile<?> file) {
-      setWrapped((F) file);
-      return this;
-    }
-
-    @Override
-    public int size() {
-      return size;
-    }
-
-    @Override
-    public <T> void set(int pos, T value) {
-      throw new UnsupportedOperationException("Cannot modify DataFileWrapper 
wrapper via set");
-    }
-
-    @Override
-    public <T> T get(int pos, Class<T> javaClass) {
-      return javaClass.cast(get(pos));
-    }
-
-    private Object get(int pos) {
-      // when the partition field is omitted, positions at or after where it 
would appear
-      // shift down by 1, so adjust back to the canonical field ordering
-      int adjusted = hasPartition ? pos : (pos >= PARTITION_POSITION ? pos + 1 
: pos);
-      switch (adjusted) {
-        case 0:
-          return wrapped.content().id();
-        case 1:
-          return wrapped.location();
-        case 2:
-          return wrapped.format() != null ? wrapped.format().toString() : null;
-        case 3:
-          return wrapped.partition();
-        case 4:
-          return wrapped.recordCount();
-        case 5:
-          return wrapped.fileSizeInBytes();
-        case 6:
-          return wrapped.columnSizes();
-        case 7:
-          return wrapped.valueCounts();
-        case 8:
-          return wrapped.nullValueCounts();
-        case 9:
-          return wrapped.nanValueCounts();
-        case 10:
-          return wrapped.lowerBounds();
-        case 11:
-          return wrapped.upperBounds();
-        case 12:
-          return wrapped.keyMetadata();
-        case 13:
-          return wrapped.splitOffsets();
-        case 14:
-          return wrapped.equalityFieldIds();
-        case 15:
-          return wrapped.sortOrderId();
-        case 16:
-          if (wrapped.content() == FileContent.DATA) {
-            return wrapped.firstRowId();
-          } else {
-            return null;
-          }
-        case 17:
-          if (wrapped.content() == FileContent.POSITION_DELETES) {
-            return ((DeleteFile) wrapped).referencedDataFile();
-          } else {
-            return null;
-          }
-        case 18:
-          if (wrapped.content() == FileContent.POSITION_DELETES) {
-            return ((DeleteFile) wrapped).contentOffset();
-          } else {
-            return null;
-          }
-        case 19:
-          if (wrapped.content() == FileContent.POSITION_DELETES) {
-            return ((DeleteFile) wrapped).contentSizeInBytes();
-          } else {
-            return null;
-          }
-      }
-      throw new IllegalArgumentException("Unknown field ordinal: " + pos);
-    }
-
-    @Override
-    public String manifestLocation() {
-      return null;
-    }
-
-    @Override
-    public Long pos() {
-      return null;
-    }
-  }
-
   /** Base wrapper used to write a {@link TrackedFile} using the v4 tracked 
file schema. */
   private abstract static class TrackedFileWrapper implements StructLike {
     private static final int SIZE =
diff --git a/core/src/test/java/org/apache/iceberg/DeleteFileIndexTestBase.java 
b/core/src/test/java/org/apache/iceberg/DeleteFileIndexTestBase.java
index 9a66c98cc6..8ddd4df146 100644
--- a/core/src/test/java/org/apache/iceberg/DeleteFileIndexTestBase.java
+++ b/core/src/test/java/org/apache/iceberg/DeleteFileIndexTestBase.java
@@ -53,7 +53,7 @@ public abstract class DeleteFileIndexTestBase<
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   static final DeleteFile FILE_A_EQ_1 =
diff --git 
a/core/src/test/java/org/apache/iceberg/PartitionStatsHandlerTestBase.java 
b/core/src/test/java/org/apache/iceberg/PartitionStatsHandlerTestBase.java
index 54cd9cd433..d4a2e8ec64 100644
--- a/core/src/test/java/org/apache/iceberg/PartitionStatsHandlerTestBase.java
+++ b/core/src/test/java/org/apache/iceberg/PartitionStatsHandlerTestBase.java
@@ -50,7 +50,7 @@ public abstract class PartitionStatsHandlerTestBase extends 
PartitionStatisticsT
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   @Parameter protected int formatVersion;
diff --git 
a/core/src/test/java/org/apache/iceberg/ScanPlanningAndReportingTestBase.java 
b/core/src/test/java/org/apache/iceberg/ScanPlanningAndReportingTestBase.java
index 4fc76db7b4..6204b330cf 100644
--- 
a/core/src/test/java/org/apache/iceberg/ScanPlanningAndReportingTestBase.java
+++ 
b/core/src/test/java/org/apache/iceberg/ScanPlanningAndReportingTestBase.java
@@ -46,7 +46,7 @@ public abstract class ScanPlanningAndReportingTestBase<
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   protected abstract ScanT newScan(Table table);
diff --git a/core/src/test/java/org/apache/iceberg/TestBase.java 
b/core/src/test/java/org/apache/iceberg/TestBase.java
index e595b151c6..452f132c34 100644
--- a/core/src/test/java/org/apache/iceberg/TestBase.java
+++ b/core/src/test/java/org/apache/iceberg/TestBase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.iceberg;
 
-import static org.apache.iceberg.TestHelpers.ALL_VERSIONS;
+import static org.apache.iceberg.TestHelpers.V3_AND_BELOW;
 import static org.apache.iceberg.types.Types.NestedField.required;
 import static org.assertj.core.api.Assertions.assertThat;
 
@@ -232,7 +232,7 @@ public class TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return ALL_VERSIONS;
+    return V3_AND_BELOW;
   }
 
   @Parameter protected int formatVersion;
@@ -452,9 +452,6 @@ public class TestBase {
       case 3:
         manifestEntrySchema = 
V3Metadata.entrySchema(table.spec().partitionType());
         break;
-      case 4:
-        manifestEntrySchema = 
V4Metadata.entrySchema(table.spec().partitionType());
-        break;
       default:
         throw new IllegalArgumentException(
             "Unsupported format version: " + 
table.ops().current().formatVersion());
diff --git a/core/src/test/java/org/apache/iceberg/TestCommitReporting.java 
b/core/src/test/java/org/apache/iceberg/TestCommitReporting.java
index 3d39dc6d38..92c4ae4694 100644
--- a/core/src/test/java/org/apache/iceberg/TestCommitReporting.java
+++ b/core/src/test/java/org/apache/iceberg/TestCommitReporting.java
@@ -35,7 +35,7 @@ public class TestCommitReporting extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   @TestTemplate
diff --git a/core/src/test/java/org/apache/iceberg/TestDeleteFiles.java 
b/core/src/test/java/org/apache/iceberg/TestDeleteFiles.java
index 41416ea608..efe44f3162 100644
--- a/core/src/test/java/org/apache/iceberg/TestDeleteFiles.java
+++ b/core/src/test/java/org/apache/iceberg/TestDeleteFiles.java
@@ -88,7 +88,7 @@ public class TestDeleteFiles extends TestBase {
 
   @Parameters(name = "formatVersion = {0}, branch = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .flatMap(
             v ->
                 Stream.of(
diff --git a/core/src/test/java/org/apache/iceberg/TestLocalFilterFiles.java 
b/core/src/test/java/org/apache/iceberg/TestLocalFilterFiles.java
index bfbe187738..f2eec4da61 100644
--- a/core/src/test/java/org/apache/iceberg/TestLocalFilterFiles.java
+++ b/core/src/test/java/org/apache/iceberg/TestLocalFilterFiles.java
@@ -18,7 +18,7 @@
  */
 package org.apache.iceberg;
 
-import static org.apache.iceberg.TestHelpers.ALL_VERSIONS;
+import static org.apache.iceberg.TestHelpers.V3_AND_BELOW;
 
 import java.util.List;
 import org.junit.jupiter.api.extension.ExtendWith;
@@ -29,7 +29,7 @@ public class TestLocalFilterFiles
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return ALL_VERSIONS;
+    return V3_AND_BELOW;
   }
 
   @Override
diff --git 
a/core/src/test/java/org/apache/iceberg/TestManifestListVersions.java 
b/core/src/test/java/org/apache/iceberg/TestManifestListVersions.java
index 2994888573..3465bb8fdb 100644
--- a/core/src/test/java/org/apache/iceberg/TestManifestListVersions.java
+++ b/core/src/test/java/org/apache/iceberg/TestManifestListVersions.java
@@ -391,7 +391,7 @@ public class TestManifestListVersions {
   }
 
   @ParameterizedTest
-  @FieldSource("org.apache.iceberg.TestHelpers#ALL_VERSIONS")
+  @FieldSource("org.apache.iceberg.TestHelpers#V3_AND_BELOW")
   public void testManifestsPartitionSummary(int formatVersion) throws 
IOException {
     ByteBuffer firstSummaryLowerBound = 
Conversions.toByteBuffer(Types.IntegerType.get(), 10);
     ByteBuffer firstSummaryUpperBound = 
Conversions.toByteBuffer(Types.IntegerType.get(), 100);
diff --git 
a/core/src/test/java/org/apache/iceberg/TestManifestWriterVersions.java 
b/core/src/test/java/org/apache/iceberg/TestManifestWriterVersions.java
index 966b573bd9..d1403447c4 100644
--- a/core/src/test/java/org/apache/iceberg/TestManifestWriterVersions.java
+++ b/core/src/test/java/org/apache/iceberg/TestManifestWriterVersions.java
@@ -169,7 +169,7 @@ public class TestManifestWriterVersions {
   }
 
   @ParameterizedTest
-  @FieldSource("org.apache.iceberg.TestHelpers#ALL_VERSIONS")
+  @FieldSource("org.apache.iceberg.TestHelpers#V3_AND_BELOW")
   public void testV2PlusWriteDelete(int formatVersion) throws IOException {
     assumeThat(formatVersion).isNotEqualTo(1);
 
@@ -184,7 +184,7 @@ public class TestManifestWriterVersions {
   }
 
   @ParameterizedTest
-  @FieldSource("org.apache.iceberg.TestHelpers#ALL_VERSIONS")
+  @FieldSource("org.apache.iceberg.TestHelpers#V3_AND_BELOW")
   public void testV2WriteDeleteWithInheritance(int formatVersion) throws 
IOException {
     assumeThat(formatVersion).isNotEqualTo(1);
 
@@ -318,7 +318,7 @@ public class TestManifestWriterVersions {
   }
 
   @ParameterizedTest
-  @FieldSource("org.apache.iceberg.TestHelpers#ALL_VERSIONS")
+  @FieldSource("org.apache.iceberg.TestHelpers#V3_AND_BELOW")
   public void testDefaultManifestCompression(int formatVersion) throws 
IOException {
     File manifestFile = temp.resolve("default-v" + formatVersion + 
".avro").toFile();
     OutputFile outputFile = Files.localOutput(manifestFile);
@@ -332,7 +332,7 @@ public class TestManifestWriterVersions {
   }
 
   @ParameterizedTest
-  @FieldSource("org.apache.iceberg.TestHelpers#ALL_VERSIONS")
+  @FieldSource("org.apache.iceberg.TestHelpers#V3_AND_BELOW")
   public void testCustomManifestCompression(int formatVersion) throws 
IOException {
     Map<String, String> props = 
ImmutableMap.of(TableProperties.AVRO_COMPRESSION, "snappy");
     File manifestFile = temp.resolve("snappy-v" + formatVersion + 
".avro").toFile();
@@ -346,100 +346,6 @@ public class TestManifestWriterVersions {
     assertThat(readAvroCodec(manifestFile)).isEqualTo("snappy");
   }
 
-  @ParameterizedTest
-  @FieldSource("V4_FORMATS")
-  public void testV4WritePartitioned(FileFormat fileFormat) throws IOException 
{
-    ManifestFile manifest = writeManifest(4, fileFormat, SPEC, DATA_FILE);
-    checkManifest(manifest, ManifestWriter.UNASSIGNED_SEQ);
-    checkEntry(
-        readManifest(manifest),
-        ManifestWriter.UNASSIGNED_SEQ,
-        ManifestWriter.UNASSIGNED_SEQ,
-        FileContent.DATA,
-        FIRST_ROW_ID);
-  }
-
-  @ParameterizedTest
-  @FieldSource("V4_FORMATS")
-  public void testV4WriteUnpartitioned(FileFormat fileFormat) throws 
IOException {
-    DataFile unpartitionedFile =
-        DataFiles.builder(PartitionSpec.unpartitioned())
-            .withPath(PATH)
-            .withFormat(FORMAT)
-            .withFileSizeInBytes(150972L)
-            .withMetrics(METRICS)
-            .withSplitOffsets(OFFSETS)
-            .withSortOrderId(SORT_ORDER_ID)
-            .withFirstRowId(FIRST_ROW_ID)
-            .build();
-
-    ManifestFile manifest =
-        writeManifest(4, fileFormat, PartitionSpec.unpartitioned(), 
unpartitionedFile);
-    checkManifest(manifest, ManifestWriter.UNASSIGNED_SEQ);
-
-    Map<Integer, PartitionSpec> unpartitionedSpecs =
-        ImmutableMap.of(PartitionSpec.unpartitioned().specId(), 
PartitionSpec.unpartitioned());
-    try (CloseableIterable<ManifestEntry<DataFile>> reader =
-        ManifestFiles.read(manifest, io, unpartitionedSpecs).entries()) {
-      ManifestEntry<DataFile> entry = Iterables.getOnlyElement(reader);
-      assertThat(entry.status()).isEqualTo(ManifestEntry.Status.ADDED);
-      assertThat(entry.file().location()).isEqualTo(PATH);
-      assertThat(entry.file().recordCount()).isEqualTo(METRICS.recordCount());
-      assertThat(entry.file().firstRowId()).isEqualTo(FIRST_ROW_ID);
-    }
-  }
-
-  @ParameterizedTest
-  @FieldSource("V4_FORMATS")
-  public void testV4WriteDeletePartitioned(FileFormat fileFormat) throws 
IOException {
-    ManifestFile manifest = writeDeleteManifest(4, fileFormat, SPEC);
-    checkManifest(manifest, ManifestWriter.UNASSIGNED_SEQ);
-    assertThat(manifest.content()).isEqualTo(ManifestContent.DELETES);
-    checkEntry(
-        readDeleteManifest(manifest),
-        ManifestWriter.UNASSIGNED_SEQ,
-        ManifestWriter.UNASSIGNED_SEQ,
-        FileContent.EQUALITY_DELETES);
-  }
-
-  @ParameterizedTest
-  @FieldSource("V4_FORMATS")
-  public void testV4WriteDeleteUnpartitioned(FileFormat fileFormat) throws 
IOException {
-    DeleteFile unpartitionedDelete =
-        new GenericDeleteFile(
-            0,
-            FileContent.EQUALITY_DELETES,
-            PATH,
-            FORMAT,
-            new PartitionData(PartitionSpec.unpartitioned().partitionType()),
-            22905L,
-            METRICS,
-            EQUALITY_ID_ARR,
-            SORT_ORDER_ID,
-            null,
-            null,
-            null,
-            null,
-            null);
-
-    ManifestFile manifest =
-        writeDeleteManifest(4, fileFormat, PartitionSpec.unpartitioned(), 
unpartitionedDelete);
-    checkManifest(manifest, ManifestWriter.UNASSIGNED_SEQ);
-    assertThat(manifest.content()).isEqualTo(ManifestContent.DELETES);
-
-    Map<Integer, PartitionSpec> unpartitionedSpecs =
-        ImmutableMap.of(PartitionSpec.unpartitioned().specId(), 
PartitionSpec.unpartitioned());
-    try (CloseableIterable<ManifestEntry<DeleteFile>> reader =
-        ManifestFiles.readDeleteManifest(manifest, io, 
unpartitionedSpecs).entries()) {
-      ManifestEntry<DeleteFile> entry = Iterables.getOnlyElement(reader);
-      assertThat(entry.status()).isEqualTo(ManifestEntry.Status.ADDED);
-      
assertThat(entry.file().content()).isEqualTo(FileContent.EQUALITY_DELETES);
-      assertThat(entry.file().location()).isEqualTo(PATH);
-      assertThat(entry.file().recordCount()).isEqualTo(METRICS.recordCount());
-      assertThat(entry.file().equalityFieldIds()).isEqualTo(EQUALITY_IDS);
-    }
-  }
-
   void checkEntry(
       ManifestEntry<?> entry,
       Long expectedDataSequenceNumber,
diff --git a/core/src/test/java/org/apache/iceberg/TestMergeAppend.java 
b/core/src/test/java/org/apache/iceberg/TestMergeAppend.java
index 2654f244f3..53d206189c 100644
--- a/core/src/test/java/org/apache/iceberg/TestMergeAppend.java
+++ b/core/src/test/java/org/apache/iceberg/TestMergeAppend.java
@@ -51,7 +51,7 @@ public class TestMergeAppend extends TestBase {
 
   @Parameters(name = "formatVersion = {0}, branch = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .flatMap(
             v ->
                 Stream.of(
diff --git 
a/core/src/test/java/org/apache/iceberg/TestMetadataTableFilters.java 
b/core/src/test/java/org/apache/iceberg/TestMetadataTableFilters.java
index ea6dcb0efe..10a1ee4db0 100644
--- a/core/src/test/java/org/apache/iceberg/TestMetadataTableFilters.java
+++ b/core/src/test/java/org/apache/iceberg/TestMetadataTableFilters.java
@@ -50,7 +50,7 @@ public class TestMetadataTableFilters extends TestBase {
 
   @Parameters(name = "formatVersion = {0}, table_type = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .flatMap(
             v -> {
               ImmutableList.Builder<Object[]> builder =
diff --git a/core/src/test/java/org/apache/iceberg/TestOverwrite.java 
b/core/src/test/java/org/apache/iceberg/TestOverwrite.java
index efd4935a4b..543f73590f 100644
--- a/core/src/test/java/org/apache/iceberg/TestOverwrite.java
+++ b/core/src/test/java/org/apache/iceberg/TestOverwrite.java
@@ -110,7 +110,7 @@ public class TestOverwrite extends TestBase {
 
   @Parameters(name = "formatVersion = {0}, branch = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .flatMap(
             v ->
                 Stream.of(
diff --git 
a/core/src/test/java/org/apache/iceberg/TestOverwriteWithValidation.java 
b/core/src/test/java/org/apache/iceberg/TestOverwriteWithValidation.java
index a63949f42b..adf6a1ae0e 100644
--- a/core/src/test/java/org/apache/iceberg/TestOverwriteWithValidation.java
+++ b/core/src/test/java/org/apache/iceberg/TestOverwriteWithValidation.java
@@ -185,7 +185,7 @@ public class TestOverwriteWithValidation extends TestBase {
 
   @Parameters(name = "formatVersion = {0}, branch = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .flatMap(
             v ->
                 Stream.of(
diff --git a/core/src/test/java/org/apache/iceberg/TestRemoveSnapshots.java 
b/core/src/test/java/org/apache/iceberg/TestRemoveSnapshots.java
index 0348972241..77e55b80db 100644
--- a/core/src/test/java/org/apache/iceberg/TestRemoveSnapshots.java
+++ b/core/src/test/java/org/apache/iceberg/TestRemoveSnapshots.java
@@ -72,11 +72,9 @@ public class TestRemoveSnapshots extends TestBase {
         new Object[] {1, true},
         new Object[] {2, true},
         new Object[] {3, true},
-        new Object[] {4, true},
         new Object[] {1, false},
         new Object[] {2, false},
-        new Object[] {3, false},
-        new Object[] {4, false});
+        new Object[] {3, false});
   }
 
   private long waitUntilAfter(long timestampMillis) {
diff --git a/core/src/test/java/org/apache/iceberg/TestRemoveSnapshotsV4.java 
b/core/src/test/java/org/apache/iceberg/TestRemoveSnapshotsV4.java
index 23ae9fa2f7..fea20dfd6e 100644
--- a/core/src/test/java/org/apache/iceberg/TestRemoveSnapshotsV4.java
+++ b/core/src/test/java/org/apache/iceberg/TestRemoveSnapshotsV4.java
@@ -90,9 +90,11 @@ class TestRemoveSnapshotsV4 {
   private Table tableWithRootManifestSnapshot() {
     Table table =
         TestTables.create(
-            tableDir, "test", TestBase.SCHEMA, TestBase.SPEC, 
SortOrder.unsorted(), 4);
+            tableDir, "test", TestBase.SCHEMA, TestBase.SPEC, 
SortOrder.unsorted(), 3);
     table.newAppend().appendFile(TestBase.FILE_A).commit();
 
+    table.updateProperties().set("format-version", "4").commit();
+
     TableOperations ops = ((HasTableOperations) table).operations();
     TableMetadata base = ops.current();
     Snapshot parent = base.currentSnapshot();
diff --git a/core/src/test/java/org/apache/iceberg/TestReplacePartitions.java 
b/core/src/test/java/org/apache/iceberg/TestReplacePartitions.java
index 1335fe33cd..90be16c1dd 100644
--- a/core/src/test/java/org/apache/iceberg/TestReplacePartitions.java
+++ b/core/src/test/java/org/apache/iceberg/TestReplacePartitions.java
@@ -124,7 +124,7 @@ public class TestReplacePartitions extends TestBase {
 
   @Parameters(name = "formatVersion = {0}, branch = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .flatMap(
             v -> Stream.of(new Object[] {v, SnapshotRef.MAIN_BRANCH}, new 
Object[] {v, "branch"}))
         .collect(Collectors.toList());
diff --git a/core/src/test/java/org/apache/iceberg/TestRewriteFiles.java 
b/core/src/test/java/org/apache/iceberg/TestRewriteFiles.java
index ad089eafad..b6118638d6 100644
--- a/core/src/test/java/org/apache/iceberg/TestRewriteFiles.java
+++ b/core/src/test/java/org/apache/iceberg/TestRewriteFiles.java
@@ -47,7 +47,7 @@ public class TestRewriteFiles extends TestBase {
 
   @Parameters(name = "formatVersion = {0}, branch = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .flatMap(
             v -> Stream.of(new Object[] {v, SnapshotRef.MAIN_BRANCH}, new 
Object[] {v, "branch"}))
         .collect(Collectors.toList());
diff --git a/core/src/test/java/org/apache/iceberg/TestRowDelta.java 
b/core/src/test/java/org/apache/iceberg/TestRowDelta.java
index b60cd6696d..543ab437a8 100644
--- a/core/src/test/java/org/apache/iceberg/TestRowDelta.java
+++ b/core/src/test/java/org/apache/iceberg/TestRowDelta.java
@@ -72,7 +72,7 @@ public class TestRowDelta extends TestBase {
 
   @Parameters(name = "formatVersion = {0}, branch = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.V2_AND_ABOVE.stream()
+    return TestHelpers.V2_AND_V3.stream()
         .flatMap(
             v ->
                 Stream.of(
diff --git a/core/src/test/java/org/apache/iceberg/TestRowLineageMetadata.java 
b/core/src/test/java/org/apache/iceberg/TestRowLineageMetadata.java
index 7b490b0856..e18179b57c 100644
--- a/core/src/test/java/org/apache/iceberg/TestRowLineageMetadata.java
+++ b/core/src/test/java/org/apache/iceberg/TestRowLineageMetadata.java
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.io.TempDir;
 public class TestRowLineageMetadata {
   @Parameters(name = "formatVersion = {0}")
   private static List<Integer> formatVersion() {
-    return TestHelpers.V3_AND_ABOVE;
+    return List.of(3);
   }
 
   @Parameter private int formatVersion;
diff --git 
a/core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java 
b/core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java
index fcf4935b7b..de765cf464 100644
--- a/core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java
+++ b/core/src/test/java/org/apache/iceberg/TestScansAndSchemaEvolution.java
@@ -18,8 +18,8 @@
  */
 package org.apache.iceberg;
 
-import static org.apache.iceberg.TestHelpers.ALL_VERSIONS;
 import static org.apache.iceberg.TestHelpers.V3_AND_ABOVE;
+import static org.apache.iceberg.TestHelpers.V3_AND_BELOW;
 import static org.apache.iceberg.types.Types.NestedField.required;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assumptions.assumeThat;
@@ -58,7 +58,7 @@ public class TestScansAndSchemaEvolution {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return ALL_VERSIONS;
+    return V3_AND_BELOW;
   }
 
   @Parameter private int formatVersion;
diff --git a/core/src/test/java/org/apache/iceberg/TestTables.java 
b/core/src/test/java/org/apache/iceberg/TestTables.java
index fdf730a220..0db195c0f9 100644
--- a/core/src/test/java/org/apache/iceberg/TestTables.java
+++ b/core/src/test/java/org/apache/iceberg/TestTables.java
@@ -359,7 +359,7 @@ public class TestTables {
 
     @Override
     public String metadataFileLocation(String fileName) {
-      return new File(metadata, fileName).getAbsolutePath();
+      return new File(metadata, fileName).toURI().toString();
     }
 
     @Override
diff --git 
a/core/src/test/java/org/apache/iceberg/actions/TestRemoveDanglingDeleteFilesAction.java
 
b/core/src/test/java/org/apache/iceberg/actions/TestRemoveDanglingDeleteFilesAction.java
index f80bde1c48..1e92ed7b63 100644
--- 
a/core/src/test/java/org/apache/iceberg/actions/TestRemoveDanglingDeleteFilesAction.java
+++ 
b/core/src/test/java/org/apache/iceberg/actions/TestRemoveDanglingDeleteFilesAction.java
@@ -253,7 +253,7 @@ public class TestRemoveDanglingDeleteFilesAction {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   private String tableLocation = null;
diff --git 
a/core/src/test/java/org/apache/iceberg/util/TestManifestFileUtil.java 
b/core/src/test/java/org/apache/iceberg/util/TestManifestFileUtil.java
index 0c7e032bde..7154669be7 100644
--- a/core/src/test/java/org/apache/iceberg/util/TestManifestFileUtil.java
+++ b/core/src/test/java/org/apache/iceberg/util/TestManifestFileUtil.java
@@ -56,7 +56,7 @@ class TestManifestFileUtil {
   @TempDir private Path temp;
 
   @ParameterizedTest
-  @FieldSource("org.apache.iceberg.TestHelpers#ALL_VERSIONS")
+  @FieldSource("org.apache.iceberg.TestHelpers#V3_AND_BELOW")
   void canContainWithUnknownTypeOnly(int formatVersion) throws IOException {
     // Parquet cannot represent the empty struct produced by an 
UnknownType-only partition
     assumeThat(formatVersion).isLessThan(MIN_FORMAT_VERSION_PARQUET_MANIFESTS);
@@ -74,7 +74,7 @@ class TestManifestFileUtil {
   }
 
   @ParameterizedTest
-  @FieldSource("org.apache.iceberg.TestHelpers#ALL_VERSIONS")
+  @FieldSource("org.apache.iceberg.TestHelpers#V3_AND_BELOW")
   void canContainWithNaNValueOnly(int formatVersion) throws IOException {
     PartitionSpec spec = 
PartitionSpec.builderFor(SCHEMA).identity("floats").build();
     PartitionData partition = new PartitionData(spec.partitionType());
@@ -90,7 +90,7 @@ class TestManifestFileUtil {
   }
 
   @ParameterizedTest
-  @FieldSource("org.apache.iceberg.TestHelpers#ALL_VERSIONS")
+  @FieldSource("org.apache.iceberg.TestHelpers#V3_AND_BELOW")
   void canContainWithNullValueOnly(int formatVersion) throws IOException {
     PartitionSpec spec = 
PartitionSpec.builderFor(SCHEMA).identity("floats").build();
     PartitionData partition = new PartitionData(spec.partitionType());
@@ -106,7 +106,7 @@ class TestManifestFileUtil {
   }
 
   @ParameterizedTest
-  @FieldSource("org.apache.iceberg.TestHelpers#ALL_VERSIONS")
+  @FieldSource("org.apache.iceberg.TestHelpers#V3_AND_BELOW")
   void canContainWithUnknownType(int formatVersion) throws IOException {
     PartitionSpec spec =
         
PartitionSpec.builderFor(SCHEMA).identity("floats").identity("unknown").build();
diff --git a/data/src/test/java/org/apache/iceberg/io/TestDVWriters.java 
b/data/src/test/java/org/apache/iceberg/io/TestDVWriters.java
index b89f04a3c0..094c690d85 100644
--- a/data/src/test/java/org/apache/iceberg/io/TestDVWriters.java
+++ b/data/src/test/java/org/apache/iceberg/io/TestDVWriters.java
@@ -68,7 +68,7 @@ public abstract class TestDVWriters<T> extends 
WriterTestBase<T> {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   private OutputFileFactory fileFactory = null;
diff --git 
a/data/src/test/java/org/apache/iceberg/io/TestTaskEqualityDeltaWriter.java 
b/data/src/test/java/org/apache/iceberg/io/TestTaskEqualityDeltaWriter.java
index 271e3fbe82..fdbd7b700c 100644
--- a/data/src/test/java/org/apache/iceberg/io/TestTaskEqualityDeltaWriter.java
+++ b/data/src/test/java/org/apache/iceberg/io/TestTaskEqualityDeltaWriter.java
@@ -83,7 +83,7 @@ public class TestTaskEqualityDeltaWriter extends TestBase {
     List<Object[]> parameters = Lists.newArrayList();
     for (FileFormat format :
         new FileFormat[] {FileFormat.AVRO, FileFormat.ORC, 
FileFormat.PARQUET}) {
-      for (int version : TestHelpers.V2_AND_ABOVE) {
+      for (int version : TestHelpers.V2_AND_V3) {
         parameters.add(new Object[] {version, format});
       }
     }
diff --git 
a/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java 
b/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java
index a83863d904..a58427c690 100644
--- 
a/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java
+++ 
b/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java
@@ -60,7 +60,7 @@ public class TestFlinkUpsert extends CatalogTestBase {
     List<Object[]> parameters = Lists.newArrayList();
     for (FileFormat format :
         new FileFormat[] {FileFormat.PARQUET, FileFormat.AVRO, 
FileFormat.ORC}) {
-      for (int version : org.apache.iceberg.TestHelpers.V2_AND_ABOVE) {
+      for (int version : org.apache.iceberg.TestHelpers.V2_AND_V3) {
         for (Boolean isStreaming : new Boolean[] {true, false}) {
           // Only test with one catalog as this is a file operation concern.
           parameters.add(
diff --git 
a/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
 
b/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
index 89f642af1c..ec0d9b386f 100644
--- 
a/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
+++ 
b/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
@@ -85,7 +85,7 @@ public class TestDeltaTaskWriter extends TestBase {
     List<Object[]> parameters = Lists.newArrayList();
     for (FileFormat format :
         new FileFormat[] {FileFormat.AVRO, FileFormat.ORC, 
FileFormat.PARQUET}) {
-      for (int version : TestHelpers.V2_AND_ABOVE) {
+      for (int version : TestHelpers.V2_AND_V3) {
         parameters.add(new Object[] {version, format});
       }
     }
diff --git 
a/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
 
b/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
index df2a940e92..94f2838698 100644
--- 
a/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
+++ 
b/flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
@@ -161,7 +161,7 @@ class TestIcebergCommitter extends TestBase {
   protected static List<Object> parameters() {
     List<Object> parameters = Lists.newArrayList();
     for (Boolean isStreamingMode : new Boolean[] {true, false}) {
-      for (int formatVersion : org.apache.iceberg.TestHelpers.ALL_VERSIONS) {
+      for (int formatVersion : org.apache.iceberg.TestHelpers.V3_AND_BELOW) {
         parameters.add(new Object[] {formatVersion, isStreamingMode, 
SnapshotRef.MAIN_BRANCH});
         parameters.add(new Object[] {formatVersion, isStreamingMode, 
"test-branch"});
       }
diff --git 
a/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java 
b/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java
index a83863d904..a58427c690 100644
--- 
a/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java
+++ 
b/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java
@@ -60,7 +60,7 @@ public class TestFlinkUpsert extends CatalogTestBase {
     List<Object[]> parameters = Lists.newArrayList();
     for (FileFormat format :
         new FileFormat[] {FileFormat.PARQUET, FileFormat.AVRO, 
FileFormat.ORC}) {
-      for (int version : org.apache.iceberg.TestHelpers.V2_AND_ABOVE) {
+      for (int version : org.apache.iceberg.TestHelpers.V2_AND_V3) {
         for (Boolean isStreaming : new Boolean[] {true, false}) {
           // Only test with one catalog as this is a file operation concern.
           parameters.add(
diff --git 
a/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
 
b/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
index 89f642af1c..ec0d9b386f 100644
--- 
a/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
+++ 
b/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
@@ -85,7 +85,7 @@ public class TestDeltaTaskWriter extends TestBase {
     List<Object[]> parameters = Lists.newArrayList();
     for (FileFormat format :
         new FileFormat[] {FileFormat.AVRO, FileFormat.ORC, 
FileFormat.PARQUET}) {
-      for (int version : TestHelpers.V2_AND_ABOVE) {
+      for (int version : TestHelpers.V2_AND_V3) {
         parameters.add(new Object[] {version, format});
       }
     }
diff --git 
a/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
 
b/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
index b4ab9d4265..bfd23331f0 100644
--- 
a/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
+++ 
b/flink/v2.2/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
@@ -161,7 +161,7 @@ class TestIcebergCommitter extends TestBase {
   protected static List<Object> parameters() {
     List<Object> parameters = Lists.newArrayList();
     for (Boolean isStreamingMode : new Boolean[] {true, false}) {
-      for (int formatVersion : org.apache.iceberg.TestHelpers.ALL_VERSIONS) {
+      for (int formatVersion : org.apache.iceberg.TestHelpers.V3_AND_BELOW) {
         parameters.add(new Object[] {formatVersion, isStreamingMode, 
SnapshotRef.MAIN_BRANCH});
         parameters.add(new Object[] {formatVersion, isStreamingMode, 
"test-branch"});
       }
diff --git 
a/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java 
b/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java
index a83863d904..a58427c690 100644
--- 
a/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java
+++ 
b/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/TestFlinkUpsert.java
@@ -60,7 +60,7 @@ public class TestFlinkUpsert extends CatalogTestBase {
     List<Object[]> parameters = Lists.newArrayList();
     for (FileFormat format :
         new FileFormat[] {FileFormat.PARQUET, FileFormat.AVRO, 
FileFormat.ORC}) {
-      for (int version : org.apache.iceberg.TestHelpers.V2_AND_ABOVE) {
+      for (int version : org.apache.iceberg.TestHelpers.V2_AND_V3) {
         for (Boolean isStreaming : new Boolean[] {true, false}) {
           // Only test with one catalog as this is a file operation concern.
           parameters.add(
diff --git 
a/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
 
b/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
index 89f642af1c..ec0d9b386f 100644
--- 
a/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
+++ 
b/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java
@@ -85,7 +85,7 @@ public class TestDeltaTaskWriter extends TestBase {
     List<Object[]> parameters = Lists.newArrayList();
     for (FileFormat format :
         new FileFormat[] {FileFormat.AVRO, FileFormat.ORC, 
FileFormat.PARQUET}) {
-      for (int version : TestHelpers.V2_AND_ABOVE) {
+      for (int version : TestHelpers.V2_AND_V3) {
         parameters.add(new Object[] {version, format});
       }
     }
diff --git 
a/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
 
b/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
index b4ab9d4265..bfd23331f0 100644
--- 
a/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
+++ 
b/flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java
@@ -161,7 +161,7 @@ class TestIcebergCommitter extends TestBase {
   protected static List<Object> parameters() {
     List<Object> parameters = Lists.newArrayList();
     for (Boolean isStreamingMode : new Boolean[] {true, false}) {
-      for (int formatVersion : org.apache.iceberg.TestHelpers.ALL_VERSIONS) {
+      for (int formatVersion : org.apache.iceberg.TestHelpers.V3_AND_BELOW) {
         parameters.add(new Object[] {formatVersion, isStreamingMode, 
SnapshotRef.MAIN_BRANCH});
         parameters.add(new Object[] {formatVersion, isStreamingMode, 
"test-branch"});
       }
diff --git 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
index 6ef1b7fd7f..dace846269 100644
--- 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
+++ 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
@@ -121,7 +121,7 @@ public class TestDeleteReachableFilesAction extends 
TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   private Table table;
diff --git 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
index c89e4f7852..e18fc7e12a 100644
--- 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
+++ 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
@@ -131,7 +131,7 @@ public class TestExpireSnapshotsAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   @TempDir private File tableDir;
diff --git 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
deleted file mode 100644
index 9252fd560b..0000000000
--- 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.iceberg.spark.actions;
-
-import static org.apache.iceberg.types.Types.NestedField.optional;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-
-import java.io.File;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.iceberg.DataFile;
-import org.apache.iceberg.DataFiles;
-import org.apache.iceberg.HasTableOperations;
-import org.apache.iceberg.PartitionSpec;
-import org.apache.iceberg.Schema;
-import org.apache.iceberg.Snapshot;
-import org.apache.iceberg.SnapshotParser;
-import org.apache.iceberg.SnapshotRef;
-import org.apache.iceberg.Table;
-import org.apache.iceberg.TableMetadata;
-import org.apache.iceberg.TableOperations;
-import org.apache.iceberg.TableProperties;
-import org.apache.iceberg.exceptions.ValidationException;
-import org.apache.iceberg.hadoop.HadoopTables;
-import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
-import org.apache.iceberg.spark.TestBase;
-import org.apache.iceberg.types.Types;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.io.TempDir;
-
-class TestExpireSnapshotsActionV4 extends TestBase {
-  private static final HadoopTables TABLES = new HadoopTables(new 
Configuration());
-  private static final Schema SCHEMA = new Schema(optional(1, "id", 
Types.IntegerType.get()));
-  private static final DataFile FILE_A =
-      DataFiles.builder(PartitionSpec.unpartitioned())
-          .withPath("/path/to/data-a.parquet")
-          .withFileSizeInBytes(10)
-          .withRecordCount(1)
-          .build();
-  private static final DataFile FILE_B =
-      DataFiles.builder(PartitionSpec.unpartitioned())
-          .withPath("/path/to/data-b.parquet")
-          .withFileSizeInBytes(10)
-          .withRecordCount(1)
-          .build();
-  private static final String UNSUPPORTED_MESSAGE =
-      "Cannot expire snapshots: this action does not support tables with root 
manifests";
-
-  @TempDir private File tableDir;
-
-  @Test
-  void rejectsExpirationWithRootManifestSnapshot() {
-    Table table = createTableWithTwoSnapshots();
-    long expirableSnapshotId = table.currentSnapshot().parentId();
-    commitRootManifestSnapshot(table);
-    TableOperations ops = ((HasTableOperations) table).operations();
-    String metadataBefore = ops.current().metadataFileLocation();
-
-    assertThatThrownBy(
-            () ->
-                SparkActions.get()
-                    .expireSnapshots(table)
-                    .expireSnapshotId(expirableSnapshotId)
-                    .execute())
-        .isInstanceOf(ValidationException.class)
-        .hasMessage(UNSUPPORTED_MESSAGE);
-
-    assertThat(ops.refresh().metadataFileLocation())
-        .as("no new metadata file should be committed")
-        .isEqualTo(metadataBefore);
-  }
-
-  @Test
-  void rejectsOnStaleHandleAfterRootManifestSnapshot() {
-    Table staleHandle = createTableWithTwoSnapshots();
-    long expirableSnapshotId = staleHandle.currentSnapshot().parentId();
-
-    // commit through a second handle; the first handle keeps its cached 
metadata
-    commitRootManifestSnapshot(TABLES.load(tableLocation()));
-    assertThat(staleHandle.snapshots()).as("stale handle should not see the 
commit").hasSize(2);
-
-    assertThatThrownBy(
-            () ->
-                SparkActions.get()
-                    .expireSnapshots(staleHandle)
-                    .expireSnapshotId(expirableSnapshotId)
-                    .execute())
-        .isInstanceOf(ValidationException.class)
-        .hasMessage(UNSUPPORTED_MESSAGE);
-
-    assertThat(TABLES.load(tableLocation()).snapshots())
-        .as("no snapshot should be expired")
-        .hasSize(3);
-  }
-
-  private Table createTableWithTwoSnapshots() {
-    Table table =
-        TABLES.create(
-            SCHEMA,
-            PartitionSpec.unpartitioned(),
-            ImmutableMap.of(TableProperties.FORMAT_VERSION, "4"),
-            tableLocation());
-    table.newAppend().appendFile(FILE_A).commit();
-    table.newAppend().appendFile(FILE_B).commit();
-    return table;
-  }
-
-  // there is no writer that produces root manifests yet, so commit a 
hand-built snapshot
-  private static void commitRootManifestSnapshot(Table table) {
-    TableOperations ops = ((HasTableOperations) table).operations();
-    TableMetadata base = ops.current();
-    Snapshot parent = base.currentSnapshot();
-    Snapshot rootManifestSnapshot =
-        SnapshotParser.fromJson(
-            String.format(
-                "{\"sequence-number\": %d, \"snapshot-id\": %d, 
\"parent-snapshot-id\": %d, "
-                    + "\"timestamp-ms\": %d, \"summary\": {\"operation\": 
\"append\"}, "
-                    + "\"schema-id\": %d, \"first-row-id\": %d, 
\"added-rows\": 0, "
-                    + "\"root-manifest\": 
\"file:/nonexistent/root-manifest.parquet\"}",
-                base.lastSequenceNumber() + 1,
-                parent.snapshotId() + 1,
-                parent.snapshotId(),
-                parent.timestampMillis() + 1,
-                base.currentSchemaId(),
-                base.nextRowId()));
-    ops.commit(
-        base,
-        TableMetadata.buildFrom(base)
-            .setBranchSnapshot(rootManifestSnapshot, SnapshotRef.MAIN_BRANCH)
-            .build());
-  }
-
-  private String tableLocation() {
-    return tableDir.toURI().toString();
-  }
-}
diff --git 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
index 34a02a93fa..0bbf325734 100644
--- 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
+++ 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
@@ -121,7 +121,7 @@ public abstract class TestRemoveOrphanFilesAction extends 
TestBase {
 
   @Parameters(name = "formatVersion = {0}, usePrefixListing = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .filter(version -> version > 1)
         .flatMap(version -> Stream.of(new Object[] {version, true}, new 
Object[] {version, false}))
         .collect(Collectors.toList());
diff --git 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
index 831f933f8a..c1dbc1e49d 100644
--- 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
+++ 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
@@ -161,7 +161,7 @@ public class TestRewriteDataFilesAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   private final FileRewriteCoordinator coordinator = 
FileRewriteCoordinator.get();
diff --git 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
index d520f350d2..ef246c7a61 100644
--- 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
+++ 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
@@ -115,7 +115,7 @@ public class TestRewriteTablePathsAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   @Parameter private int formatVersion;
diff --git 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
index 92aace3dfd..e19726883c 100644
--- 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
+++ 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
@@ -82,7 +82,7 @@ public class TestPositionDeletesReader extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   @BeforeEach
diff --git 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
index 1eb6ea0dcc..8f9f33b5f4 100644
--- 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
+++ 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
@@ -90,7 +90,7 @@ public class TestSparkMetadataColumns extends TestBase {
   @Parameters(name = "fileFormat = {0}, vectorized = {1}, formatVersion = {2}")
   public static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
-    for (int version : TestHelpers.ALL_VERSIONS) {
+    for (int version : TestHelpers.V3_AND_BELOW) {
       parameters.add(new Object[] {FileFormat.PARQUET, false, version});
       parameters.add(new Object[] {FileFormat.PARQUET, true, version});
       parameters.add(new Object[] {FileFormat.AVRO, false, version});
diff --git 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
index 2fb6933ce9..38bec0d7f5 100644
--- 
a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
+++ 
b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
@@ -114,7 +114,7 @@ public class TestSparkReaderDeletes extends DeleteReadTests 
{
   @Parameters(name = "fileFormat = {0}, formatVersion = {1}, vectorized = {2}, 
planningMode = {3}")
   public static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
-    for (int version : TestHelpers.V2_AND_ABOVE) {
+    for (int version : TestHelpers.V2_AND_V3) {
       parameters.add(new Object[] {FileFormat.PARQUET, version, false, 
PlanningMode.DISTRIBUTED});
       parameters.add(new Object[] {FileFormat.PARQUET, version, true, 
PlanningMode.LOCAL});
       if (version == 2) {
diff --git 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
index 1bd26f7aa1..a3b242607d 100644
--- 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
+++ 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
@@ -121,7 +121,7 @@ public class TestDeleteReachableFilesAction extends 
TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   private Table table;
diff --git 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
index c89e4f7852..e18fc7e12a 100644
--- 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
+++ 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
@@ -131,7 +131,7 @@ public class TestExpireSnapshotsAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   @TempDir private File tableDir;
diff --git 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
deleted file mode 100644
index 9252fd560b..0000000000
--- 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.iceberg.spark.actions;
-
-import static org.apache.iceberg.types.Types.NestedField.optional;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-
-import java.io.File;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.iceberg.DataFile;
-import org.apache.iceberg.DataFiles;
-import org.apache.iceberg.HasTableOperations;
-import org.apache.iceberg.PartitionSpec;
-import org.apache.iceberg.Schema;
-import org.apache.iceberg.Snapshot;
-import org.apache.iceberg.SnapshotParser;
-import org.apache.iceberg.SnapshotRef;
-import org.apache.iceberg.Table;
-import org.apache.iceberg.TableMetadata;
-import org.apache.iceberg.TableOperations;
-import org.apache.iceberg.TableProperties;
-import org.apache.iceberg.exceptions.ValidationException;
-import org.apache.iceberg.hadoop.HadoopTables;
-import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
-import org.apache.iceberg.spark.TestBase;
-import org.apache.iceberg.types.Types;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.io.TempDir;
-
-class TestExpireSnapshotsActionV4 extends TestBase {
-  private static final HadoopTables TABLES = new HadoopTables(new 
Configuration());
-  private static final Schema SCHEMA = new Schema(optional(1, "id", 
Types.IntegerType.get()));
-  private static final DataFile FILE_A =
-      DataFiles.builder(PartitionSpec.unpartitioned())
-          .withPath("/path/to/data-a.parquet")
-          .withFileSizeInBytes(10)
-          .withRecordCount(1)
-          .build();
-  private static final DataFile FILE_B =
-      DataFiles.builder(PartitionSpec.unpartitioned())
-          .withPath("/path/to/data-b.parquet")
-          .withFileSizeInBytes(10)
-          .withRecordCount(1)
-          .build();
-  private static final String UNSUPPORTED_MESSAGE =
-      "Cannot expire snapshots: this action does not support tables with root 
manifests";
-
-  @TempDir private File tableDir;
-
-  @Test
-  void rejectsExpirationWithRootManifestSnapshot() {
-    Table table = createTableWithTwoSnapshots();
-    long expirableSnapshotId = table.currentSnapshot().parentId();
-    commitRootManifestSnapshot(table);
-    TableOperations ops = ((HasTableOperations) table).operations();
-    String metadataBefore = ops.current().metadataFileLocation();
-
-    assertThatThrownBy(
-            () ->
-                SparkActions.get()
-                    .expireSnapshots(table)
-                    .expireSnapshotId(expirableSnapshotId)
-                    .execute())
-        .isInstanceOf(ValidationException.class)
-        .hasMessage(UNSUPPORTED_MESSAGE);
-
-    assertThat(ops.refresh().metadataFileLocation())
-        .as("no new metadata file should be committed")
-        .isEqualTo(metadataBefore);
-  }
-
-  @Test
-  void rejectsOnStaleHandleAfterRootManifestSnapshot() {
-    Table staleHandle = createTableWithTwoSnapshots();
-    long expirableSnapshotId = staleHandle.currentSnapshot().parentId();
-
-    // commit through a second handle; the first handle keeps its cached 
metadata
-    commitRootManifestSnapshot(TABLES.load(tableLocation()));
-    assertThat(staleHandle.snapshots()).as("stale handle should not see the 
commit").hasSize(2);
-
-    assertThatThrownBy(
-            () ->
-                SparkActions.get()
-                    .expireSnapshots(staleHandle)
-                    .expireSnapshotId(expirableSnapshotId)
-                    .execute())
-        .isInstanceOf(ValidationException.class)
-        .hasMessage(UNSUPPORTED_MESSAGE);
-
-    assertThat(TABLES.load(tableLocation()).snapshots())
-        .as("no snapshot should be expired")
-        .hasSize(3);
-  }
-
-  private Table createTableWithTwoSnapshots() {
-    Table table =
-        TABLES.create(
-            SCHEMA,
-            PartitionSpec.unpartitioned(),
-            ImmutableMap.of(TableProperties.FORMAT_VERSION, "4"),
-            tableLocation());
-    table.newAppend().appendFile(FILE_A).commit();
-    table.newAppend().appendFile(FILE_B).commit();
-    return table;
-  }
-
-  // there is no writer that produces root manifests yet, so commit a 
hand-built snapshot
-  private static void commitRootManifestSnapshot(Table table) {
-    TableOperations ops = ((HasTableOperations) table).operations();
-    TableMetadata base = ops.current();
-    Snapshot parent = base.currentSnapshot();
-    Snapshot rootManifestSnapshot =
-        SnapshotParser.fromJson(
-            String.format(
-                "{\"sequence-number\": %d, \"snapshot-id\": %d, 
\"parent-snapshot-id\": %d, "
-                    + "\"timestamp-ms\": %d, \"summary\": {\"operation\": 
\"append\"}, "
-                    + "\"schema-id\": %d, \"first-row-id\": %d, 
\"added-rows\": 0, "
-                    + "\"root-manifest\": 
\"file:/nonexistent/root-manifest.parquet\"}",
-                base.lastSequenceNumber() + 1,
-                parent.snapshotId() + 1,
-                parent.snapshotId(),
-                parent.timestampMillis() + 1,
-                base.currentSchemaId(),
-                base.nextRowId()));
-    ops.commit(
-        base,
-        TableMetadata.buildFrom(base)
-            .setBranchSnapshot(rootManifestSnapshot, SnapshotRef.MAIN_BRANCH)
-            .build());
-  }
-
-  private String tableLocation() {
-    return tableDir.toURI().toString();
-  }
-}
diff --git 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
index 34a02a93fa..0bbf325734 100644
--- 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
+++ 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
@@ -121,7 +121,7 @@ public abstract class TestRemoveOrphanFilesAction extends 
TestBase {
 
   @Parameters(name = "formatVersion = {0}, usePrefixListing = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .filter(version -> version > 1)
         .flatMap(version -> Stream.of(new Object[] {version, true}, new 
Object[] {version, false}))
         .collect(Collectors.toList());
diff --git 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
index 2be79e8295..b2a5b73b4b 100644
--- 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
+++ 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
@@ -162,7 +162,7 @@ public class TestRewriteDataFilesAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   private final FileRewriteCoordinator coordinator = 
FileRewriteCoordinator.get();
diff --git 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
index d520f350d2..ef246c7a61 100644
--- 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
+++ 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
@@ -115,7 +115,7 @@ public class TestRewriteTablePathsAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   @Parameter private int formatVersion;
diff --git 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
index a84c2516dd..c132a12ed6 100644
--- 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
+++ 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
@@ -82,7 +82,7 @@ public class TestPositionDeletesReader extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   @BeforeEach
diff --git 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
index 68f6f17aae..90b928696f 100644
--- 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
+++ 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
@@ -91,7 +91,7 @@ public class TestSparkMetadataColumns extends TestBase {
   @Parameters(name = "fileFormat = {0}, vectorized = {1}, formatVersion = {2}")
   public static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
-    for (int version : TestHelpers.ALL_VERSIONS) {
+    for (int version : TestHelpers.V3_AND_BELOW) {
       parameters.add(new Object[] {FileFormat.PARQUET, false, version});
       parameters.add(new Object[] {FileFormat.PARQUET, true, version});
       parameters.add(new Object[] {FileFormat.AVRO, false, version});
diff --git 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
index 2fb6933ce9..38bec0d7f5 100644
--- 
a/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
+++ 
b/spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
@@ -114,7 +114,7 @@ public class TestSparkReaderDeletes extends DeleteReadTests 
{
   @Parameters(name = "fileFormat = {0}, formatVersion = {1}, vectorized = {2}, 
planningMode = {3}")
   public static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
-    for (int version : TestHelpers.V2_AND_ABOVE) {
+    for (int version : TestHelpers.V2_AND_V3) {
       parameters.add(new Object[] {FileFormat.PARQUET, version, false, 
PlanningMode.DISTRIBUTED});
       parameters.add(new Object[] {FileFormat.PARQUET, version, true, 
PlanningMode.LOCAL});
       if (version == 2) {
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
index 1bd26f7aa1..a3b242607d 100644
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
+++ 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
@@ -121,7 +121,7 @@ public class TestDeleteReachableFilesAction extends 
TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   private Table table;
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
index c89e4f7852..e18fc7e12a 100644
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
+++ 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
@@ -131,7 +131,7 @@ public class TestExpireSnapshotsAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   @TempDir private File tableDir;
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
deleted file mode 100644
index 9252fd560b..0000000000
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.iceberg.spark.actions;
-
-import static org.apache.iceberg.types.Types.NestedField.optional;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-
-import java.io.File;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.iceberg.DataFile;
-import org.apache.iceberg.DataFiles;
-import org.apache.iceberg.HasTableOperations;
-import org.apache.iceberg.PartitionSpec;
-import org.apache.iceberg.Schema;
-import org.apache.iceberg.Snapshot;
-import org.apache.iceberg.SnapshotParser;
-import org.apache.iceberg.SnapshotRef;
-import org.apache.iceberg.Table;
-import org.apache.iceberg.TableMetadata;
-import org.apache.iceberg.TableOperations;
-import org.apache.iceberg.TableProperties;
-import org.apache.iceberg.exceptions.ValidationException;
-import org.apache.iceberg.hadoop.HadoopTables;
-import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
-import org.apache.iceberg.spark.TestBase;
-import org.apache.iceberg.types.Types;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.io.TempDir;
-
-class TestExpireSnapshotsActionV4 extends TestBase {
-  private static final HadoopTables TABLES = new HadoopTables(new 
Configuration());
-  private static final Schema SCHEMA = new Schema(optional(1, "id", 
Types.IntegerType.get()));
-  private static final DataFile FILE_A =
-      DataFiles.builder(PartitionSpec.unpartitioned())
-          .withPath("/path/to/data-a.parquet")
-          .withFileSizeInBytes(10)
-          .withRecordCount(1)
-          .build();
-  private static final DataFile FILE_B =
-      DataFiles.builder(PartitionSpec.unpartitioned())
-          .withPath("/path/to/data-b.parquet")
-          .withFileSizeInBytes(10)
-          .withRecordCount(1)
-          .build();
-  private static final String UNSUPPORTED_MESSAGE =
-      "Cannot expire snapshots: this action does not support tables with root 
manifests";
-
-  @TempDir private File tableDir;
-
-  @Test
-  void rejectsExpirationWithRootManifestSnapshot() {
-    Table table = createTableWithTwoSnapshots();
-    long expirableSnapshotId = table.currentSnapshot().parentId();
-    commitRootManifestSnapshot(table);
-    TableOperations ops = ((HasTableOperations) table).operations();
-    String metadataBefore = ops.current().metadataFileLocation();
-
-    assertThatThrownBy(
-            () ->
-                SparkActions.get()
-                    .expireSnapshots(table)
-                    .expireSnapshotId(expirableSnapshotId)
-                    .execute())
-        .isInstanceOf(ValidationException.class)
-        .hasMessage(UNSUPPORTED_MESSAGE);
-
-    assertThat(ops.refresh().metadataFileLocation())
-        .as("no new metadata file should be committed")
-        .isEqualTo(metadataBefore);
-  }
-
-  @Test
-  void rejectsOnStaleHandleAfterRootManifestSnapshot() {
-    Table staleHandle = createTableWithTwoSnapshots();
-    long expirableSnapshotId = staleHandle.currentSnapshot().parentId();
-
-    // commit through a second handle; the first handle keeps its cached 
metadata
-    commitRootManifestSnapshot(TABLES.load(tableLocation()));
-    assertThat(staleHandle.snapshots()).as("stale handle should not see the 
commit").hasSize(2);
-
-    assertThatThrownBy(
-            () ->
-                SparkActions.get()
-                    .expireSnapshots(staleHandle)
-                    .expireSnapshotId(expirableSnapshotId)
-                    .execute())
-        .isInstanceOf(ValidationException.class)
-        .hasMessage(UNSUPPORTED_MESSAGE);
-
-    assertThat(TABLES.load(tableLocation()).snapshots())
-        .as("no snapshot should be expired")
-        .hasSize(3);
-  }
-
-  private Table createTableWithTwoSnapshots() {
-    Table table =
-        TABLES.create(
-            SCHEMA,
-            PartitionSpec.unpartitioned(),
-            ImmutableMap.of(TableProperties.FORMAT_VERSION, "4"),
-            tableLocation());
-    table.newAppend().appendFile(FILE_A).commit();
-    table.newAppend().appendFile(FILE_B).commit();
-    return table;
-  }
-
-  // there is no writer that produces root manifests yet, so commit a 
hand-built snapshot
-  private static void commitRootManifestSnapshot(Table table) {
-    TableOperations ops = ((HasTableOperations) table).operations();
-    TableMetadata base = ops.current();
-    Snapshot parent = base.currentSnapshot();
-    Snapshot rootManifestSnapshot =
-        SnapshotParser.fromJson(
-            String.format(
-                "{\"sequence-number\": %d, \"snapshot-id\": %d, 
\"parent-snapshot-id\": %d, "
-                    + "\"timestamp-ms\": %d, \"summary\": {\"operation\": 
\"append\"}, "
-                    + "\"schema-id\": %d, \"first-row-id\": %d, 
\"added-rows\": 0, "
-                    + "\"root-manifest\": 
\"file:/nonexistent/root-manifest.parquet\"}",
-                base.lastSequenceNumber() + 1,
-                parent.snapshotId() + 1,
-                parent.snapshotId(),
-                parent.timestampMillis() + 1,
-                base.currentSchemaId(),
-                base.nextRowId()));
-    ops.commit(
-        base,
-        TableMetadata.buildFrom(base)
-            .setBranchSnapshot(rootManifestSnapshot, SnapshotRef.MAIN_BRANCH)
-            .build());
-  }
-
-  private String tableLocation() {
-    return tableDir.toURI().toString();
-  }
-}
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
index 78e8a0b000..6fb4d60b72 100644
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
+++ 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
@@ -122,7 +122,7 @@ public abstract class TestRemoveOrphanFilesAction extends 
TestBase {
 
   @Parameters(name = "formatVersion = {0}, usePrefixListing = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .filter(version -> version > 1)
         .flatMap(version -> Stream.of(new Object[] {version, true}, new 
Object[] {version, false}))
         .collect(Collectors.toList());
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
index 4ea6448f38..2a03f5a551 100644
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
+++ 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
@@ -162,7 +162,7 @@ public class TestRewriteDataFilesAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   private final FileRewriteCoordinator coordinator = 
FileRewriteCoordinator.get();
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
index d520f350d2..ef246c7a61 100644
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
+++ 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
@@ -115,7 +115,7 @@ public class TestRewriteTablePathsAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   @Parameter private int formatVersion;
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
index 681ab1fd76..38e47d7189 100644
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
+++ 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
@@ -82,7 +82,7 @@ public class TestPositionDeletesReader extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   @BeforeEach
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
index 7498f129b2..033a9f3138 100644
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
+++ 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
@@ -91,7 +91,7 @@ public class TestSparkMetadataColumns extends TestBase {
   @Parameters(name = "fileFormat = {0}, vectorized = {1}, formatVersion = {2}")
   public static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
-    for (int version : TestHelpers.ALL_VERSIONS) {
+    for (int version : TestHelpers.V3_AND_BELOW) {
       parameters.add(new Object[] {FileFormat.PARQUET, false, version});
       parameters.add(new Object[] {FileFormat.PARQUET, true, version});
       parameters.add(new Object[] {FileFormat.AVRO, false, version});
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
index 0d61930571..51efaa159b 100644
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
+++ 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
@@ -114,7 +114,7 @@ public class TestSparkReaderDeletes extends DeleteReadTests 
{
   @Parameters(name = "fileFormat = {0}, formatVersion = {1}, vectorized = {2}, 
planningMode = {3}")
   public static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
-    for (int version : TestHelpers.V2_AND_ABOVE) {
+    for (int version : TestHelpers.V2_AND_V3) {
       parameters.add(new Object[] {FileFormat.PARQUET, version, false, 
PlanningMode.DISTRIBUTED});
       parameters.add(new Object[] {FileFormat.PARQUET, version, true, 
PlanningMode.LOCAL});
       if (version == 2) {
diff --git 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/sql/TestDeleteFrom.java
 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/sql/TestDeleteFrom.java
index 0d010087cd..4e13735221 100644
--- 
a/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/sql/TestDeleteFrom.java
+++ 
b/spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/sql/TestDeleteFrom.java
@@ -53,7 +53,7 @@ public class TestDeleteFrom extends CatalogTestBase {
   protected static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
     for (Object[] catalogParams : CatalogTestBase.parameters()) {
-      for (int version : TestHelpers.V2_AND_ABOVE) {
+      for (int version : TestHelpers.V2_AND_V3) {
         parameters.add(
             new Object[] {catalogParams[0], catalogParams[1], 
catalogParams[2], version});
       }
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
index 1bd26f7aa1..a3b242607d 100644
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
+++ 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
@@ -121,7 +121,7 @@ public class TestDeleteReachableFilesAction extends 
TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   private Table table;
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
index 61857cdf35..b766cff29f 100644
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
+++ 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
@@ -134,7 +134,7 @@ public class TestExpireSnapshotsAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   @TempDir private File tableDir;
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
deleted file mode 100644
index 9252fd560b..0000000000
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsActionV4.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.iceberg.spark.actions;
-
-import static org.apache.iceberg.types.Types.NestedField.optional;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-
-import java.io.File;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.iceberg.DataFile;
-import org.apache.iceberg.DataFiles;
-import org.apache.iceberg.HasTableOperations;
-import org.apache.iceberg.PartitionSpec;
-import org.apache.iceberg.Schema;
-import org.apache.iceberg.Snapshot;
-import org.apache.iceberg.SnapshotParser;
-import org.apache.iceberg.SnapshotRef;
-import org.apache.iceberg.Table;
-import org.apache.iceberg.TableMetadata;
-import org.apache.iceberg.TableOperations;
-import org.apache.iceberg.TableProperties;
-import org.apache.iceberg.exceptions.ValidationException;
-import org.apache.iceberg.hadoop.HadoopTables;
-import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
-import org.apache.iceberg.spark.TestBase;
-import org.apache.iceberg.types.Types;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.io.TempDir;
-
-class TestExpireSnapshotsActionV4 extends TestBase {
-  private static final HadoopTables TABLES = new HadoopTables(new 
Configuration());
-  private static final Schema SCHEMA = new Schema(optional(1, "id", 
Types.IntegerType.get()));
-  private static final DataFile FILE_A =
-      DataFiles.builder(PartitionSpec.unpartitioned())
-          .withPath("/path/to/data-a.parquet")
-          .withFileSizeInBytes(10)
-          .withRecordCount(1)
-          .build();
-  private static final DataFile FILE_B =
-      DataFiles.builder(PartitionSpec.unpartitioned())
-          .withPath("/path/to/data-b.parquet")
-          .withFileSizeInBytes(10)
-          .withRecordCount(1)
-          .build();
-  private static final String UNSUPPORTED_MESSAGE =
-      "Cannot expire snapshots: this action does not support tables with root 
manifests";
-
-  @TempDir private File tableDir;
-
-  @Test
-  void rejectsExpirationWithRootManifestSnapshot() {
-    Table table = createTableWithTwoSnapshots();
-    long expirableSnapshotId = table.currentSnapshot().parentId();
-    commitRootManifestSnapshot(table);
-    TableOperations ops = ((HasTableOperations) table).operations();
-    String metadataBefore = ops.current().metadataFileLocation();
-
-    assertThatThrownBy(
-            () ->
-                SparkActions.get()
-                    .expireSnapshots(table)
-                    .expireSnapshotId(expirableSnapshotId)
-                    .execute())
-        .isInstanceOf(ValidationException.class)
-        .hasMessage(UNSUPPORTED_MESSAGE);
-
-    assertThat(ops.refresh().metadataFileLocation())
-        .as("no new metadata file should be committed")
-        .isEqualTo(metadataBefore);
-  }
-
-  @Test
-  void rejectsOnStaleHandleAfterRootManifestSnapshot() {
-    Table staleHandle = createTableWithTwoSnapshots();
-    long expirableSnapshotId = staleHandle.currentSnapshot().parentId();
-
-    // commit through a second handle; the first handle keeps its cached 
metadata
-    commitRootManifestSnapshot(TABLES.load(tableLocation()));
-    assertThat(staleHandle.snapshots()).as("stale handle should not see the 
commit").hasSize(2);
-
-    assertThatThrownBy(
-            () ->
-                SparkActions.get()
-                    .expireSnapshots(staleHandle)
-                    .expireSnapshotId(expirableSnapshotId)
-                    .execute())
-        .isInstanceOf(ValidationException.class)
-        .hasMessage(UNSUPPORTED_MESSAGE);
-
-    assertThat(TABLES.load(tableLocation()).snapshots())
-        .as("no snapshot should be expired")
-        .hasSize(3);
-  }
-
-  private Table createTableWithTwoSnapshots() {
-    Table table =
-        TABLES.create(
-            SCHEMA,
-            PartitionSpec.unpartitioned(),
-            ImmutableMap.of(TableProperties.FORMAT_VERSION, "4"),
-            tableLocation());
-    table.newAppend().appendFile(FILE_A).commit();
-    table.newAppend().appendFile(FILE_B).commit();
-    return table;
-  }
-
-  // there is no writer that produces root manifests yet, so commit a 
hand-built snapshot
-  private static void commitRootManifestSnapshot(Table table) {
-    TableOperations ops = ((HasTableOperations) table).operations();
-    TableMetadata base = ops.current();
-    Snapshot parent = base.currentSnapshot();
-    Snapshot rootManifestSnapshot =
-        SnapshotParser.fromJson(
-            String.format(
-                "{\"sequence-number\": %d, \"snapshot-id\": %d, 
\"parent-snapshot-id\": %d, "
-                    + "\"timestamp-ms\": %d, \"summary\": {\"operation\": 
\"append\"}, "
-                    + "\"schema-id\": %d, \"first-row-id\": %d, 
\"added-rows\": 0, "
-                    + "\"root-manifest\": 
\"file:/nonexistent/root-manifest.parquet\"}",
-                base.lastSequenceNumber() + 1,
-                parent.snapshotId() + 1,
-                parent.snapshotId(),
-                parent.timestampMillis() + 1,
-                base.currentSchemaId(),
-                base.nextRowId()));
-    ops.commit(
-        base,
-        TableMetadata.buildFrom(base)
-            .setBranchSnapshot(rootManifestSnapshot, SnapshotRef.MAIN_BRANCH)
-            .build());
-  }
-
-  private String tableLocation() {
-    return tableDir.toURI().toString();
-  }
-}
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
index 78e8a0b000..6fb4d60b72 100644
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
+++ 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRemoveOrphanFilesAction.java
@@ -122,7 +122,7 @@ public abstract class TestRemoveOrphanFilesAction extends 
TestBase {
 
   @Parameters(name = "formatVersion = {0}, usePrefixListing = {1}")
   protected static List<Object> parameters() {
-    return TestHelpers.ALL_VERSIONS.stream()
+    return TestHelpers.V3_AND_BELOW.stream()
         .filter(version -> version > 1)
         .flatMap(version -> Stream.of(new Object[] {version, true}, new 
Object[] {version, false}))
         .collect(Collectors.toList());
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
index 4ea6448f38..2a03f5a551 100644
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
+++ 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
@@ -162,7 +162,7 @@ public class TestRewriteDataFilesAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   private final FileRewriteCoordinator coordinator = 
FileRewriteCoordinator.get();
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
index d520f350d2..ef246c7a61 100644
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
+++ 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteTablePathsAction.java
@@ -115,7 +115,7 @@ public class TestRewriteTablePathsAction extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> formatVersions() {
-    return TestHelpers.V2_AND_ABOVE;
+    return TestHelpers.V2_AND_V3;
   }
 
   @Parameter private int formatVersion;
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
index 681ab1fd76..38e47d7189 100644
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
+++ 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesReader.java
@@ -82,7 +82,7 @@ public class TestPositionDeletesReader extends TestBase {
 
   @Parameters(name = "formatVersion = {0}")
   protected static List<Integer> parameters() {
-    return org.apache.iceberg.TestHelpers.V2_AND_ABOVE;
+    return org.apache.iceberg.TestHelpers.V2_AND_V3;
   }
 
   @BeforeEach
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
index 7498f129b2..033a9f3138 100644
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
+++ 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkMetadataColumns.java
@@ -91,7 +91,7 @@ public class TestSparkMetadataColumns extends TestBase {
   @Parameters(name = "fileFormat = {0}, vectorized = {1}, formatVersion = {2}")
   public static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
-    for (int version : TestHelpers.ALL_VERSIONS) {
+    for (int version : TestHelpers.V3_AND_BELOW) {
       parameters.add(new Object[] {FileFormat.PARQUET, false, version});
       parameters.add(new Object[] {FileFormat.PARQUET, true, version});
       parameters.add(new Object[] {FileFormat.AVRO, false, version});
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
index a40ffb5eab..b5a7d83f19 100644
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
+++ 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
@@ -116,7 +116,7 @@ public class TestSparkReaderDeletes extends DeleteReadTests 
{
   @Parameters(name = "fileFormat = {0}, formatVersion = {1}, vectorized = {2}, 
planningMode = {3}")
   public static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
-    for (int version : TestHelpers.V2_AND_ABOVE) {
+    for (int version : TestHelpers.V2_AND_V3) {
       parameters.add(new Object[] {FileFormat.PARQUET, version, false, 
PlanningMode.DISTRIBUTED});
       parameters.add(new Object[] {FileFormat.PARQUET, version, true, 
PlanningMode.LOCAL});
       if (version == 2) {
diff --git 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/sql/TestDeleteFrom.java
 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/sql/TestDeleteFrom.java
index 0d010087cd..4e13735221 100644
--- 
a/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/sql/TestDeleteFrom.java
+++ 
b/spark/v4.2/spark/src/test/java/org/apache/iceberg/spark/sql/TestDeleteFrom.java
@@ -53,7 +53,7 @@ public class TestDeleteFrom extends CatalogTestBase {
   protected static Object[][] parameters() {
     List<Object[]> parameters = Lists.newArrayList();
     for (Object[] catalogParams : CatalogTestBase.parameters()) {
-      for (int version : TestHelpers.V2_AND_ABOVE) {
+      for (int version : TestHelpers.V2_AND_V3) {
         parameters.add(
             new Object[] {catalogParams[0], catalogParams[1], 
catalogParams[2], version});
       }

Reply via email to