pub struct StringArrayBuilder {
offsets_buffer: MutableBuffer,
value_buffer: MutableBuffer,
}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
Fields§
§offsets_buffer: MutableBuffer§value_buffer: MutableBufferImplementations§
Source§impl StringArrayBuilder
impl StringArrayBuilder
pub fn with_capacity( item_capacity: usize, data_capacity: usize, ) -> StringArrayBuilder
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>,
) -> GenericByteArray<GenericStringType<i32>>
pub fn finish( self, null_buffer: Option<NullBuffer>, ) -> GenericByteArray<GenericStringType<i32>>
Finalize the builder into a concrete StringArray.
§Panics
This method can panic when:
- the provided
null_bufferis 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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