pub struct PrimitiveArrayBuilder<T> { /* private fields */ }
Implementations§
Source§impl<T: NativeType> PrimitiveArrayBuilder<T>
impl<T: NativeType> PrimitiveArrayBuilder<T>
pub fn new(dtype: ArrowDataType) -> Self
Trait Implementations§
Source§impl<T: NativeType> StaticArrayBuilder for PrimitiveArrayBuilder<T>
impl<T: NativeType> StaticArrayBuilder for PrimitiveArrayBuilder<T>
type Array = PrimitiveArray<T>
fn dtype(&self) -> &ArrowDataType
fn reserve(&mut self, additional: usize)
Source§fn freeze(self) -> PrimitiveArray<T>
fn freeze(self) -> PrimitiveArray<T>
Consume this builder returning the built array.
Source§fn freeze_reset(&mut self) -> Self::Array
fn freeze_reset(&mut self) -> Self::Array
Return the built array and reset to an empty state.
Source§fn extend_nulls(&mut self, length: usize)
fn extend_nulls(&mut self, length: usize)
Extend this builder with the given number of null elements.
Source§fn subslice_extend(
&mut self,
other: &PrimitiveArray<T>,
start: usize,
length: usize,
_share: ShareStrategy,
)
fn subslice_extend( &mut self, other: &PrimitiveArray<T>, start: usize, length: usize, _share: ShareStrategy, )
Extends this builder with the contents of the given array subslice. May
panic if other does not match the dtype of this array.
Source§fn subslice_extend_each_repeated(
&mut self,
other: &PrimitiveArray<T>,
start: usize,
length: usize,
repeats: usize,
_share: ShareStrategy,
)
fn subslice_extend_each_repeated( &mut self, other: &PrimitiveArray<T>, start: usize, length: usize, repeats: usize, _share: ShareStrategy, )
The same as subslice_extend, but repeats each element
repeats
times.Source§unsafe fn gather_extend(
&mut self,
other: &PrimitiveArray<T>,
idxs: &[IdxSize],
_share: ShareStrategy,
)
unsafe fn gather_extend( &mut self, other: &PrimitiveArray<T>, idxs: &[IdxSize], _share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]]
is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Read moreSource§fn opt_gather_extend(
&mut self,
other: &PrimitiveArray<T>,
idxs: &[IdxSize],
_share: ShareStrategy,
)
fn opt_gather_extend( &mut self, other: &PrimitiveArray<T>, idxs: &[IdxSize], _share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]]
is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Out-of-bounds indices are mapped to nulls.Source§fn extend(&mut self, other: &Self::Array, share: ShareStrategy)
fn extend(&mut self, other: &Self::Array, share: ShareStrategy)
Extends this builder with the contents of the given array. May panic if
other does not match the dtype of this array.
Source§fn subslice_extend_repeated(
&mut self,
other: &Self::Array,
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
)
fn subslice_extend_repeated( &mut self, other: &Self::Array, start: usize, length: usize, repeats: usize, share: ShareStrategy, )
The same as subslice_extend, but repeats the extension
repeats
times.Auto Trait Implementations§
impl<T> Freeze for PrimitiveArrayBuilder<T>
impl<T> RefUnwindSafe for PrimitiveArrayBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for PrimitiveArrayBuilder<T>where
T: Send,
impl<T> Sync for PrimitiveArrayBuilder<T>where
T: Sync,
impl<T> Unpin for PrimitiveArrayBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for PrimitiveArrayBuilder<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArrayBuilder for Twhere
T: StaticArrayBuilder,
impl<T> ArrayBuilder for Twhere
T: StaticArrayBuilder,
fn dtype(&self) -> &ArrowDataType
fn reserve(&mut self, additional: usize)
Source§fn freeze_reset(&mut self) -> Box<dyn Array>
fn freeze_reset(&mut self) -> Box<dyn Array>
Return the built array and reset to an empty state.
Source§fn extend_nulls(&mut self, length: usize)
fn extend_nulls(&mut self, length: usize)
Extend this builder with the given number of null elements.
Source§fn subslice_extend(
&mut self,
other: &(dyn Array + 'static),
start: usize,
length: usize,
share: ShareStrategy,
)
fn subslice_extend( &mut self, other: &(dyn Array + 'static), start: usize, length: usize, share: ShareStrategy, )
Extends this builder with the contents of the given array subslice. May
panic if other does not match the dtype of this array.
Source§fn subslice_extend_repeated(
&mut self,
other: &(dyn Array + 'static),
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
)
fn subslice_extend_repeated( &mut self, other: &(dyn Array + 'static), start: usize, length: usize, repeats: usize, share: ShareStrategy, )
The same as subslice_extend, but repeats the extension
repeats
times.Source§fn subslice_extend_each_repeated(
&mut self,
other: &(dyn Array + 'static),
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
)
fn subslice_extend_each_repeated( &mut self, other: &(dyn Array + 'static), start: usize, length: usize, repeats: usize, share: ShareStrategy, )
The same as subslice_extend, but repeats each element
repeats
times.Source§unsafe fn gather_extend(
&mut self,
other: &(dyn Array + 'static),
idxs: &[u32],
share: ShareStrategy,
)
unsafe fn gather_extend( &mut self, other: &(dyn Array + 'static), idxs: &[u32], share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]]
is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Read moreSource§fn opt_gather_extend(
&mut self,
other: &(dyn Array + 'static),
idxs: &[u32],
share: ShareStrategy,
)
fn opt_gather_extend( &mut self, other: &(dyn Array + 'static), idxs: &[u32], share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]]
is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Out-of-bounds indices are mapped to nulls.Source§fn extend(&mut self, other: &dyn Array, share: ShareStrategy)
fn extend(&mut self, other: &dyn Array, share: ShareStrategy)
Extends this builder with the contents of the given array. May panic if
other does not match the dtype of this array.
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