Skip to content

feat: [velox][iceberg] Add Iceberg V3 deletion vector support (#16870)#16870

Open
apurva-meta wants to merge 2 commits intofacebookincubator:mainfrom
apurva-meta:export-D97530142
Open

feat: [velox][iceberg] Add Iceberg V3 deletion vector support (#16870)#16870
apurva-meta wants to merge 2 commits intofacebookincubator:mainfrom
apurva-meta:export-D97530142

Conversation

@apurva-meta
Copy link

@apurva-meta apurva-meta commented Mar 21, 2026

Summary:

Add deletion vector (DV) reader to the Velox Iceberg connector,
enabling Iceberg V3 spec support for row-level deletes.

Iceberg V3 replaces positional delete files with deletion vectors — compact
roaring bitmaps stored as blobs inside Puffin files. Compared to V2 positional
delete files, DVs are more compact and avoid sorted merge of multiple delete
files at read time.

Changes:

  • IcebergDeleteFile.h: Add FileContent::kDeletionVector enum value
  • DeletionVectorReader.h/cpp: New reader that loads a Puffin blob,
    deserializes the roaring bitmap portable format (array, bitset, and run
    containers), and sets bits in the deleteBitmap for the current batch range.
    No CRoaring dependency — self-contained parser.
  • IcebergSplitReader.h: Add deletionVectorReaders_ member, include header
  • IcebergSplitReader.cpp: Route kDeletionVector in prepareSplit(), apply
    DVs alongside positional deletes in next()
  • BUCK: Add DeletionVectorReader library target

Differential Revision: D97530142

@netlify
Copy link

netlify bot commented Mar 21, 2026

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 34fbaf6
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/69be3b6c98dbbe0007e8ba89

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 21, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 21, 2026

@apurva-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97530142.

apurva-meta added a commit to apurva-meta/velox that referenced this pull request Mar 21, 2026
…okincubator#16870)

Summary:

Add deletion vector (DV) reader to the Velox Iceberg connector,
enabling Iceberg V3 spec support for row-level deletes.

Iceberg V3 replaces positional delete files with deletion vectors — compact
roaring bitmaps stored as blobs inside Puffin files. Compared to V2 positional
delete files, DVs are more compact and avoid sorted merge of multiple delete
files at read time.

Changes:
- IcebergDeleteFile.h: Add FileContent::kDeletionVector enum value
- DeletionVectorReader.h/cpp: New reader that loads a Puffin blob,
  deserializes the roaring bitmap portable format (array, bitset, and run
  containers), and sets bits in the deleteBitmap for the current batch range.
  No CRoaring dependency — self-contained parser.
- IcebergSplitReader.h: Add deletionVectorReaders_ member, include header
- IcebergSplitReader.cpp: Route kDeletionVector in prepareSplit(), apply
  DVs alongside positional deletes in next()
- BUCK: Add DeletionVectorReader library target

Differential Revision: D97530142
@meta-codesync meta-codesync bot changed the title feat: [velox][iceberg] Add Iceberg V3 deletion vector support feat: [velox][iceberg] Add Iceberg V3 deletion vector support (#16870) Mar 21, 2026
apurva-meta added a commit to apurva-meta/velox that referenced this pull request Mar 21, 2026
…okincubator#16870)

Summary:

Add deletion vector (DV) reader to the Velox Iceberg connector,
enabling Iceberg V3 spec support for row-level deletes.

Iceberg V3 replaces positional delete files with deletion vectors — compact
roaring bitmaps stored as blobs inside Puffin files. Compared to V2 positional
delete files, DVs are more compact and avoid sorted merge of multiple delete
files at read time.

Changes:
- IcebergDeleteFile.h: Add FileContent::kDeletionVector enum value
- DeletionVectorReader.h/cpp: New reader that loads a Puffin blob,
  deserializes the roaring bitmap portable format (array, bitset, and run
  containers), and sets bits in the deleteBitmap for the current batch range.
  No CRoaring dependency — self-contained parser.
- IcebergSplitReader.h: Add deletionVectorReaders_ member, include header
- IcebergSplitReader.cpp: Route kDeletionVector in prepareSplit(), apply
  DVs alongside positional deletes in next()
- BUCK: Add DeletionVectorReader library target

Differential Revision: D97530142
@apurva-meta apurva-meta force-pushed the export-D97530142 branch 2 times, most recently from bc3bd7c to c4b38ea Compare March 21, 2026 06:29
…ix test file handle leaks (facebookincubator#16869)

Summary:

- Add explicit equality deletes NYI branch in prepareSplit()
- Improve VELOX_NYI error messages with descriptive content type info
- Fix FILE handle leaks in IcebergReadTest by extracting getTestFileSize() helper
- Minor doc comment formatting improvements in IcebergSplitReader.h

Differential Revision: D97530140
…okincubator#16870)

Summary:

Add deletion vector (DV) reader to the Velox Iceberg connector,
enabling Iceberg V3 spec support for row-level deletes.

Iceberg V3 replaces positional delete files with deletion vectors — compact
roaring bitmaps stored as blobs inside Puffin files. Compared to V2 positional
delete files, DVs are more compact and avoid sorted merge of multiple delete
files at read time.

Changes:
- IcebergDeleteFile.h: Add FileContent::kDeletionVector enum value
- DeletionVectorReader.h/cpp: New reader that loads a Puffin blob,
  deserializes the roaring bitmap portable format (array, bitset, and run
  containers), and sets bits in the deleteBitmap for the current batch range.
  No CRoaring dependency — self-contained parser.
- IcebergSplitReader.h: Add deletionVectorReaders_ member, include header
- IcebergSplitReader.cpp: Route kDeletionVector in prepareSplit(), apply
  DVs alongside positional deletes in next()
- BUCK: Add DeletionVectorReader library target

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant