feat: support write for deletion vector#158
Merged
lucasfang merged 8 commits intoalibaba:mainfrom Feb 28, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds write-path support for deletion vectors by introducing a generic IndexFile base and implementing deletion-vector index file writing utilities, along with extending DeletionVector/BitmapDeletionVector serialization APIs and adding unit tests for bitmap deletion vectors.
Changes:
- Add
IndexFilebase abstraction (path/exists/size/delete) for index-file operations. - Implement deletion vector index file writing (
DeletionVectorsIndexFile,DeletionVectorIndexFileWriter,DeletionFileWriter). - Extend
DeletionVector/BitmapDeletionVectorwith cardinality + stream serialization and addBitmapDeletionVectorunit tests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/paimon/core/index/index_file.h | New base class for index-file filesystem/path operations |
| src/paimon/core/deletionvectors/deletion_vectors_index_file.h | Make DV index file derive from IndexFile and expose write entrypoint |
| src/paimon/core/deletionvectors/deletion_vectors_index_file.cpp | Implements DV index file write delegation to writer |
| src/paimon/core/deletionvectors/deletion_vector_index_file_writer.h | Declares DV index file writer (currently with unused target-size parameter) |
| src/paimon/core/deletionvectors/deletion_vector_index_file_writer.cpp | Implements writing a single DV file via DeletionFileWriter |
| src/paimon/core/deletionvectors/deletion_vector.h | Extends DV interface with GetCardinality() and SerializeTo(...) |
| src/paimon/core/deletionvectors/deletion_file_writer.h | New low-level writer producing IndexFileMeta + DV range metadata |
| src/paimon/core/deletionvectors/bitmap_deletion_vector.h | Refactors serialization declarations and adds constants |
| src/paimon/core/deletionvectors/bitmap_deletion_vector.cpp | Implements stream serialization + deserialize + bounds checking logic |
| src/paimon/core/deletionvectors/bitmap_deletion_vector_test.cpp | Adds unit tests for bitmap deletion vector behavior/serialization |
| src/paimon/CMakeLists.txt | Wires new sources and test into build |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/paimon/core/deletionvectors/deletion_vector_index_file_writer.cpp
Outdated
Show resolved
Hide resolved
src/paimon/core/deletionvectors/deletion_vector_index_file_writer.cpp
Outdated
Show resolved
Hide resolved
src/paimon/core/deletionvectors/deletion_vector_index_file_writer.h
Outdated
Show resolved
Hide resolved
lxy-9602
reviewed
Feb 28, 2026
9cb4f90 to
d08ed9f
Compare
lxy-9602
reviewed
Feb 28, 2026
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.
Purpose
Support write for deletion vectors by introducing a generic IndexFile base and implementing deletion-vector index file writing utilities, along with extending DeletionVector/BitmapDeletionVector serialization APIs and adding unit tests for bitmap deletion vectors.
Tests
BitmapDeletionVectorTest
DeletionVectorsIndexFileTest
API and Format
Documentation