Skip to content
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

Refactor Integer RLE V2 handling #50

Merged
merged 3 commits into from
Dec 4, 2023
Merged

Refactor Integer RLE V2 handling #50

merged 3 commits into from
Dec 4, 2023

Conversation

Jefffrey
Copy link
Collaborator

@Jefffrey Jefffrey commented Dec 4, 2023

No description provided.

num_literals: usize,
used: usize,
skip_corrupt: bool,
literals: VecDeque<i64>,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

VecDeque provides same functionality, without us needing to fiddle with the indices/len ourselves


impl<R: Read> RleReaderV2<R> {
pub fn new(reader: R, signed: bool, skip_corrupt: bool) -> Self {
pub fn new(reader: R, signed: bool) -> Self {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think we should provide functionality for skipping corrupt streams:

  • If this integer stream is corrupt, and since columns are made of multiple streams, chances are the expected output will also be corrupt as stream lengths won't match

Comment on lines +54 to +58
pub fn read_values(&mut self) -> Result<bool> {
let header = match try_read_u8(&mut self.reader)? {
Some(byte) => byte,
None => return Ok(false),
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed the ignore_eof logic, as have similar thoughts to the removal of skip corrupt

@Jefffrey Jefffrey requested a review from WenyXu December 4, 2023 11:11
Copy link
Collaborator

@WenyXu WenyXu left a comment

Choose a reason for hiding this comment

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

Well done👍

@WenyXu WenyXu merged commit f5a5b21 into main Dec 4, 2023
6 checks passed
@WenyXu WenyXu deleted the refactor/rle_v2 branch December 4, 2023 13:17
progval pushed a commit to progval/datafusion-orc that referenced this pull request Mar 6, 2024
Implement serialization / deserialization via bytecode
waynexia pushed a commit that referenced this pull request Oct 24, 2024
* Refactor Integer RLE V2 handling

* Fix

* Trigger
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.

2 participants