feat: plan support to plan deletion vector#118
Merged
JingsongLi merged 1 commit intoapache:mainfrom Mar 13, 2026
Merged
Conversation
5bd8d5c to
ff4ce50
Compare
ff4ce50 to
7002a87
Compare
Comment on lines
+60
to
+68
|
|
||
| /// Read a single DeletionVector from storage using DeletionFile (path/offset/length). | ||
| /// Same as Java's DeletionVector.read(FileIO, DeletionFile). | ||
| async fn read(file_io: &FileIO, df: &crate::DeletionFile) -> Result<DeletionVector> { | ||
| let input = file_io.new_input(df.path())?; | ||
| let reader = input.reader().await?; | ||
| let offset = df.offset() as u64; | ||
| let len = df.length() as u64; | ||
| let bytes = reader.read(offset..offset.saturating_add(len)).await?; |
There was a problem hiding this comment.
read_from_bytes expects len + 8 bytes: 4 bytes (bitmapLength) + len bytes (magic + bitmap data) + 4 bytes (CRC). Should be offset.saturating_add(len + 8) here
Contributor
Author
There was a problem hiding this comment.
Path path = new Path(deletionFile.path());
try (SeekableInputStream input = fileIO.newInputStream(path)) {
input.seek(deletionFile.offset());
DataInputStream dis = new DataInputStream(input);
return read(dis, deletionFile.length());
}
}
But according to this java code, it should be fine to use deletion file length directly.
There was a problem hiding this comment.
Path path = new Path(deletionFile.path()); try (SeekableInputStream input = fileIO.newInputStream(path)) { input.seek(deletionFile.offset()); DataInputStream dis = new DataInputStream(input); return read(dis, deletionFile.length()); } }But according to this java code, it should be fine to use deletion file length directly.
let bytes = &std::fs::read(&path).unwrap()[1..25]; // do not read the entire file here
DeletionVector::read_from_bytes(&bytes, Some(24))
You can try to test this to check whether it works well. Should be ok, if works.
Contributor
Author
There was a problem hiding this comment.
I already verified the dv table reading with my final pr #100. I believe it should be fine.
XiaoHongbo-Hope
approved these changes
Mar 13, 2026
|
+1 |
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
Linked issue: close #117
Brief change log
Tests
API and Format
Documentation