Skip to content

Core: Extend TestRemoveSnapshots parameterization to V3 - #17772

Open
dkranchii wants to merge 1 commit into
apache:mainfrom
dkranchii:core-test-remove-snapshots-v3-coverage
Open

Core: Extend TestRemoveSnapshots parameterization to V3#17772
dkranchii wants to merge 1 commit into
apache:mainfrom
dkranchii:core-test-remove-snapshots-v3-coverage

Conversation

@dkranchii

Copy link
Copy Markdown

Summary

Extend TestRemoveSnapshots to run every test against format version 3 in addition to V1 and V2, and make testExpireWithDeleteFiles version-agnostic so it exercises both V2 position-delete parquet files and V3 deletion vectors.

Motivation

Follow-up to reviewer feedback on #17745 asking for expanded V3 coverage in TestRemoveSnapshots. V3 has been the default table format for new writes in recent releases but the snapshot-expiration test class only exercised V1 and V2. This closes that gap for the whole class, not just the delete-file test.

Changes

  • @Parameters matrix gains {3, true} and {3, false} entries, so every @TestTemplate in the class runs against V3 for both the incremental and reachable cleanup strategies.
  • testExpireWithDeleteFiles now uses the existing fileADeletes() / fileBDeletes() helpers from TestBase (which return position deletes for V2 and DVs for V3) instead of hardcoded FILE_A_DELETES / FILE_B_DELETES. Version guard widened from isEqualTo(2) to isIn(2, 3).

V1 has no delete files and V4+ folds delete entries into the root manifest, so V2 and V3 remain the only versions that carry standalone delete manifests.

Test plan

  • ./gradlew :iceberg-core:test --tests "org.apache.iceberg.TestRemoveSnapshots" passes for all six parameter combinations (V1/V2/V3 × incremental/reachable).

AI Disclosure

  • Platform/Tool: Cursor

Add format version 3 to the @parameters matrix so every test in
TestRemoveSnapshots runs against V1, V2, and V3 with both cleanup
strategies. Widen testExpireWithDeleteFiles to accept both V2 and V3
using the fileADeletes() / fileBDeletes() helpers from TestBase, which
transparently return position-delete parquet files for V2 and deletion
vectors for V3.
V1 has no delete files and V4+ folds delete entries into the root
manifest, so V2 and V3 are the only versions that carry standalone
delete manifests.
@uros-b

uros-b commented Aug 23, 2026

Copy link
Copy Markdown
Member

LGTM, thank you @dkranchii!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants