Skip to content

feat(scan): [2/N] carry deletion-vector coordinates on FileScanTaskDeleteFile#2868

Open
mbutrovich wants to merge 4 commits into
apache:mainfrom
mbutrovich:dv-scan-task
Open

feat(scan): [2/N] carry deletion-vector coordinates on FileScanTaskDeleteFile#2868
mbutrovich wants to merge 4 commits into
apache:mainfrom
mbutrovich:dv-scan-task

Conversation

@mbutrovich

Copy link
Copy Markdown
Collaborator

Which issue does this PR close?

What changes are included in this PR?

Adds referenced_data_file, content_offset, and content_size_in_bytes to FileScanTaskDeleteFile, populated from the delete file's manifest entry (DataFile) in From<&DeleteFileContext>. content_offset / content_size_in_bytes locate a deletion-vector blob within its Puffin file, and referenced_data_file scopes it to the data file it applies to. The delete loader will use these to read and apply V3 deletion vectors (a later PR in this epic).

This mirrors Iceberg-Java, where a deletion vector is a DeleteFile (content=POSITION_DELETES, format=PUFFIN) carrying these fields, attached to a task via FileScanTask.deletes().

No behavior change on its own: the fields default to None and are only populated, nothing reads them yet. This is independent of the codec PR #2866; both are prerequisites for the loader.

Are these changes tested?

Unit test in delete_file_index.rs: builds a deletion-vector-shaped DataFile (Puffin, PositionDeletes, with content_offset / content_size_in_bytes / referenced_data_file), converts it to a FileScanTaskDeleteFile, and asserts the three coordinates survive the conversion.

This is also exercised end to end against deletion vectors written by Spark / Iceberg-Java in a draft DataFusion Comet PR (apache/datafusion-comet#4887), which reads real V3 merge-on-read tables through this path.

Add referenced_data_file, content_offset, and content_size_in_bytes to
FileScanTaskDeleteFile, populated from the delete file's manifest entry.
These locate a deletion-vector blob and scope it to its data file, which
the delete loader needs to read and apply V3 deletion vectors.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant