Skip to content

feat(fixed-sized-binary builder): introduce capacity - #11127

Merged
Jefffrey merged 1 commit into
apache:mainfrom
Rich-T-kid:rich-T-kid/expose-capacity-fsb-builder
Sep 18, 2026
Merged

Jefffrey merged 1 commit into
apache:mainfrom
Rich-T-kid:rich-T-kid/expose-capacity-fsb-builder

Conversation

@Rich-T-kid

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #NNN.

Rationale for this change

see https://github.com/apache/arrow-rs/pull/11122/changes#r4042748474

What changes are included in this PR?

new capacity method

Are these changes tested?

I think its self evident

Are there any user-facing changes?

new public method on the fixed-sized-binary builder

@Rich-T-kid Rich-T-kid changed the title introduce capacity to fsb builder feat(fixed-sized-binary builder): introduce capacity to fsb builder Sep 18, 2026
@Rich-T-kid Rich-T-kid changed the title feat(fixed-sized-binary builder): introduce capacity to fsb builder feat(fixed-sized-binary builder): introduce capacity Sep 18, 2026
}
/// Returns the total memory capacity in bytes currently
pub fn capacity(&self) -> usize {
self.values_builder.capacity() + self.null_buffer_builder.allocated_size() + 4 // i32

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if we're gonna account for the 4 bytes of value length it raises the question of if we should also account for pointers of Vec too 😅

but this is a minor thing anyway

@Jefffrey Jefffrey added the enhancement New feature/addition label Sep 18, 2026
@Jefffrey
Jefffrey merged commit 68b18dc into apache:main Sep 18, 2026
41 of 43 checks passed
@Jefffrey

Copy link
Copy Markdown
Contributor

thanks @Rich-T-kid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature/addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants