Skip to content

feat(transaction): RewriteFilesAction + Validation Support + Process Delete Manifests#1606

Closed
CTTY wants to merge 22 commits intoapache:mainfrom
CTTY:ctty/pure-rewrite
Closed

feat(transaction): RewriteFilesAction + Validation Support + Process Delete Manifests#1606
CTTY wants to merge 22 commits intoapache:mainfrom
CTTY:ctty/pure-rewrite

Conversation

@CTTY
Copy link
Copy Markdown
Collaborator

@CTTY CTTY commented Aug 15, 2025

Which issue does this PR close?

What changes are included in this PR?

  • Implemented RewriteFilesAction
  • Added SnapshotValidator and implemented it for RewriteFilesOperation
  • Added logic to process delete files in SnapshotProducer and generate manifests

Are these changes tested?

Not tested so far

Comment thread crates/iceberg/src/transaction/rewrite_files.rs Outdated
Comment thread crates/iceberg/src/transaction/rewrite_files.rs Outdated

for entry in manifest.entries() {
match entry.content_type() {
DataContentType::Data => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the exact same code blocks? So why does the ManifestEntry's DataContentType matter? Why not just do:

for entry in manifest.entries() {
    if snapshot_producer
        .deleted_data_files
        .iter()
        .any(|f| f.file_path == entry.data_file.file_path())
     {
         delete_entries.push(copy_with_deleted_status())
     }
        
}

Copy link
Copy Markdown
Collaborator Author

@CTTY CTTY Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks very similar with one little difference: one block iterates thru deleted_data_files and another iterates thru deleted_delete_files

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Feb 27, 2026
@CTTY CTTY force-pushed the ctty/pure-rewrite branch from 336c974 to 4d984e0 Compare March 6, 2026 00:06
@github-actions github-actions Bot removed the stale label Mar 6, 2026
Aman-singh-7 pushed a commit to Aman-singh-7/iceberg-rust that referenced this pull request Mar 17, 2026
Details a concrete, file-by-file plan to implement RewriteFilesAction
in iceberg-rust — the compaction primitive that atomically swaps old
data files for new ones in a single Replace snapshot.

Key design decisions documented:
- Extend SnapshotProducer with deleted_data_files + write_deleted_manifest()
- New RewriteFilesOperation implementing SnapshotProduceOperation with
  Operation::Replace and manifest-level skip logic for deleted files
- Public RewriteFilesAction API mirroring FastAppendAction patterns
- Expose via Transaction::rewrite_files()
- 7 unit tests covering basic flow, error cases, and catalog round-trip
- Notes how this infrastructure enables OverwriteFiles and DeleteFiles next

Relates to open upstream issue: apache#1606

https://claude.ai/code/session_01EkUKvhB7p4jz4qZxYaneBb
wasifaleem added a commit to Supermetal-Inc/iceberg-rust that referenced this pull request Apr 1, 2026
wasifaleem added a commit to Supermetal-Inc/iceberg-rust that referenced this pull request Apr 1, 2026
wasifaleem added a commit to Supermetal-Inc/iceberg-rust that referenced this pull request Apr 1, 2026
wasifaleem added a commit to Supermetal-Inc/iceberg-rust that referenced this pull request Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions Bot closed this Apr 12, 2026
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.

Add RewriteFiles support to iceberg-rust

2 participants