-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rust] Read Partially from a plain encoded batch #443
Conversation
rust/src/encodings/plain.rs
Outdated
start, end, self.length | ||
))); | ||
} | ||
let start_offset = match self.data_type { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s make a “index_to_offset” function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
}; | ||
let range = Range { | ||
start: self.position, | ||
end: self.position + array_bytes, | ||
start: self.position + start_offset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely remember that the C++ implementation was more complicated than this. Any edge cases that’s not covered here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not cover the logic in C++ PlainEncoder::Take(indices)
yet.
For C++, PlainEncoder::ToArray(...)
this PR reaches the parity.
https://github.com/eto-ai/lance/blob/main/cpp/src/lance/encodings/plain.cc#L127-L149
Added 2 more tests to cover edge cases nonetheless.
No description provided.