feat(table): add RewriteDataFiles for compaction execution#892
Merged
zeroshade merged 1 commit intoapache:mainfrom Apr 14, 2026
Merged
feat(table): add RewriteDataFiles for compaction execution#892zeroshade merged 1 commit intoapache:mainfrom
zeroshade merged 1 commit intoapache:mainfrom
Conversation
zeroshade
approved these changes
Apr 14, 2026
Member
zeroshade
left a comment
There was a problem hiding this comment.
Should we have a test that confirms that equality delete files get left? Otherwise looks good to me!
Contributor
Author
|
good call, will add a test: write data files, commit equality deletes via RowDelta, compact, then verify equality delete files are still present in the post-compaction snapshot and still apply on scan. |
Add Transaction.RewriteDataFiles() that reads data with deletes applied, writes new consolidated files, and atomically replaces old files via ReplaceFiles. Position delete files matched to rewritten data files are removed in the same commit. - CompactionTaskGroup bridges compaction planner and executor (avoids circular import between table/ and table/compaction/) - collectSafePositionDeletes only removes pos deletes with explicit content type check; equality deletes preserved (may apply outside scope) - Context cancellation checked between groups - Empty groups skipped gracefully E2e tests with real Parquet files: - Small file compaction (5→1 file, row count preserved) - Position delete cleanup (delete applied, delete file removed) - Empty plan / empty group handling - Partial progress mode - Context cancellation Part of apache#832 (table compaction).
bc6c772 to
02e8989
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Transaction.RewriteDataFiles() that reads data with deletes applied, writes new consolidated files, and atomically replaces old files via ReplaceFiles. Position delete files matched to rewritten data files are removed in the same commit.
E2e tests with real Parquet files:
Part of #832 (table compaction).