Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Dec 19, 2025

Which issue does this PR close?

Rationale for this change

As I study this code, I want to encode my learnings for both my future self and future readers of this code

What changes are included in this PR?

Add documentation on the structure of the arrow buffer crate as well as details on how BooleanBuffer works

Are these changes tested?

CI

Are there any user-facing changes?

Just docs, no functional changes

@alamb alamb added the documentation Improvements or additions to documentation label Dec 19, 2025
@github-actions github-actions bot added the arrow Changes to the arrow crate label Dec 19, 2025
Comment on lines 77 to 79
offset: usize,
/// Length in bits (not bytes)
len: usize,
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth renaming the fields themselves to bit_offset and bit_length for further clarity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I think this is a good idea -- I will do so as a follow on PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alamb alamb merged commit 1fec0fb into apache:main Dec 23, 2025
26 checks passed
Jefffrey pushed a commit that referenced this pull request Dec 25, 2025
# Which issue does this PR close?

- Follow on to #9020

# Rationale for this change

@Jefffrey suggested renaming these fields would help make it even more
clear that the offset and lengths in `BooleanBuffer` are in terms of
bits (not bytes)

# What changes are included in this PR?

Update field names and improve some more comments

# Are these changes tested?


# Are there any user-facing changes?

No, this is internal field name and documentation changes only

I did consider deprecating `BooleanBuffer::len` and renaming it to
`BooleanBuffer::bit_len` and similarly for offset, but that seems overly
aggressive for downstream consumers (they have to make changes for no
obvious benefit 🤔 )
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 documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants