Conversation
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
AdamGS
approved these changes
Apr 17, 2026
Contributor
Author
|
Hmm, actually this begs the question of, do we want to match Arrow 8-bit Bool representation, or do we want to force it to be a Rust https://arrow.apache.org/docs/format/CanonicalExtensions.html#bit-boolean |
Contributor
Author
|
I think this should probably use 8-bit bool instead (i.e. truthy bytes = true, 0x00 = false). Let me fix this up. |
This reverts commit 655082c. Signed-off-by: Andrew Duffy <andrew@a10y.dev>
6367c77 to
d9e61d0
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
f2c8146 to
cd23309
Compare
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.
Summary
Our existing ByteBool constructor accepts arbitrary bytes as input, and will attempt to transmute it to a
&[bool]. If those bytes are not0x00or0x01that can trigger UB on release builds.API Changes
We eliminate the
ByteBool::as_slice() -> &[bool]method, replacing it with an accessor to the truthy byte values.We don't really need to access this as a bool-slice anyway since we can do all operations on the bytes and wrap them back up as a ByteBool.
We also eliminate some old From constructors for ByteBool that I think we probably don't want lying around
Tests
No additional tests needed