Skip to content

feat: support write for deletion vector#158

Open
lucasfang wants to merge 7 commits intoalibaba:mainfrom
lucasfang:compaction_dev
Open

feat: support write for deletion vector#158
lucasfang wants to merge 7 commits intoalibaba:mainfrom
lucasfang:compaction_dev

Conversation

@lucasfang
Copy link
Collaborator

@lucasfang lucasfang commented Feb 28, 2026

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

API and Format

Documentation

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 IndexFile base abstraction (path/exists/size/delete) for index-file operations.
  • Implement deletion vector index file writing (DeletionVectorsIndexFile, DeletionVectorIndexFileWriter, DeletionFileWriter).
  • Extend DeletionVector / BitmapDeletionVector with cardinality + stream serialization and add BitmapDeletionVector unit 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.


private:
std::shared_ptr<DeletionVectorIndexFileWriter> CreateWriter() const;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add some cases for DeletionVectorsIndexFile, some normal se/de cases and with external path cases to verify IndexFileMeta.

Copy link
Collaborator

Choose a reason for hiding this comment

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

See DeletionVectorTest.java DeletionVectorsIndexFileTest.java for references.

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.

3 participants