pub struct StringArrayBuilder { /* private fields */ }
Expand description
Optimized version of the StringBuilder in Arrow that:
- Precalculating the expected length of the result, avoiding reallocations.
- Avoids creating / incrementally creating a
NullBufferBuilder
Implementations§
Source§impl StringArrayBuilder
impl StringArrayBuilder
pub fn with_capacity(item_capacity: usize, data_capacity: usize) -> Self
pub fn write<const CHECK_VALID: bool>( &mut self, column: &ColumnarValueRef<'_>, i: usize, )
pub fn append_offset(&mut self)
Sourcepub fn finish(self, null_buffer: Option<NullBuffer>) -> StringArray
pub fn finish(self, null_buffer: Option<NullBuffer>) -> StringArray
Finalize the builder into a concrete StringArray
.
§Panics
This method can panic when:
- the provided
null_buffer
is not the same length as theoffsets_buffer
.
Auto Trait Implementations§
impl Freeze for StringArrayBuilder
impl RefUnwindSafe for StringArrayBuilder
impl Send for StringArrayBuilder
impl Sync for StringArrayBuilder
impl Unpin for StringArrayBuilder
impl UnwindSafe for StringArrayBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more