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

BooleanBufferBuilder Fails to Clear Set Bits On Truncate #3587

Closed
tustvold opened this issue Jan 23, 2023 · 1 comment · Fixed by #3588
Closed

BooleanBufferBuilder Fails to Clear Set Bits On Truncate #3587

tustvold opened this issue Jan 23, 2023 · 1 comment · Fixed by #3588
Assignees
Labels
arrow Changes to the arrow crate bug

Comments

@tustvold
Copy link
Contributor

Describe the bug

BooleanBufferBuilder operates on the assumption that unset bits are zeroed, this is not always the case

To Reproduce

let b = MutableBuffer::from_iter([true, true, true, true]);
let mut builder = BooleanBufferBuilder::new_from_buffer(b, 2);
builder.advance(2);
let finished = builder.finish();
assert_eq!(finished.as_slice(), &[0b00000011])
let mut builder = BooleanBufferBuilder::new(10);
builder.append_n(5, true);
builder.resize(3);
builder.advance(2);
let finished = builder.finish();
assert_eq!(finished.as_slice(), &[0b00000111]);

Expected behavior

Additional context

@tustvold tustvold added the bug label Jan 23, 2023
@tustvold tustvold self-assigned this Jan 23, 2023
@tustvold tustvold changed the title BooleanBufferBuilder Fails to Clear Set Bits BooleanBufferBuilder Fails to Clear Set Bits On Truncate Jan 23, 2023
tustvold added a commit to tustvold/arrow-rs that referenced this issue Jan 23, 2023
tustvold added a commit to tustvold/arrow-rs that referenced this issue Jan 23, 2023
@tustvold
Copy link
Contributor Author

label_issue.py automatically added labels {'arrow'} from #3588

@tustvold tustvold added the arrow Changes to the arrow crate label Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant