pub(crate) struct InProgressPrimitiveArray<T: ArrowPrimitiveType> {
data_type: DataType,
source: Option<ArrayRef>,
batch_size: usize,
nulls: NullBufferBuilder,
current: Vec<T::Native>,
}Expand description
InProgressArray for [PrimitiveArray]
Fields§
§data_type: DataTypeData type of the array
source: Option<ArrayRef>The current source, if any
batch_size: usizethe target batch size (and thus size for views allocation)
nulls: NullBufferBuilderIn progress nulls
current: Vec<T::Native>The currently in progress array
Implementations§
Source§impl<T: ArrowPrimitiveType> InProgressPrimitiveArray<T>
impl<T: ArrowPrimitiveType> InProgressPrimitiveArray<T>
Sourcepub(crate) fn new(batch_size: usize, data_type: DataType) -> Self
pub(crate) fn new(batch_size: usize, data_type: DataType) -> Self
Create a new InProgressPrimitiveArray
Sourcefn ensure_capacity(&mut self)
fn ensure_capacity(&mut self)
Allocate space for output values if necessary.
This is done on write (when we know it is necessary) rather than eagerly to avoid allocations that are not used.
fn append_values_by_indices( current: &mut Vec<T::Native>, values: &[T::Native], indices: FilterIterator<Copied<Iter<'_, usize>>, IndexIterator<'_>>, selected_count: usize, )
fn append_values_by_slices( current: &mut Vec<T::Native>, values: &[T::Native], slices: FilterIterator<Copied<Iter<'_, (usize, usize)>>, SlicesIterator<'_>>, selected_count: usize, )
Trait Implementations§
Source§impl<T: Debug + ArrowPrimitiveType> Debug for InProgressPrimitiveArray<T>where
T::Native: Debug,
impl<T: Debug + ArrowPrimitiveType> Debug for InProgressPrimitiveArray<T>where
T::Native: Debug,
Source§impl<T: ArrowPrimitiveType + Debug> InProgressArray for InProgressPrimitiveArray<T>
impl<T: ArrowPrimitiveType + Debug> InProgressArray for InProgressPrimitiveArray<T>
Source§fn set_source(&mut self, source: Option<ArrayRef>)
fn set_source(&mut self, source: Option<ArrayRef>)
Set the source array. Read more
Source§fn copy_rows(&mut self, offset: usize, len: usize) -> Result<(), ArrowError>
fn copy_rows(&mut self, offset: usize, len: usize) -> Result<(), ArrowError>
Copy rows from the current source array into the in-progress array Read more
Source§fn copy_rows_by_filter(
&mut self,
filter: &FilterPredicate,
) -> Result<(), ArrowError>
fn copy_rows_by_filter( &mut self, filter: &FilterPredicate, ) -> Result<(), ArrowError>
Copy rows selected by
filter from the current source array.Source§fn finish(&mut self) -> Result<ArrayRef, ArrowError>
fn finish(&mut self) -> Result<ArrayRef, ArrowError>
Finish the currently in-progress array and return it as an
ArrayRefSource§fn copy_rows_by_filter_from(
&mut self,
source: ArrayRef,
filter: &FilterPredicate,
) -> Result<(), ArrowError>
fn copy_rows_by_filter_from( &mut self, source: ArrayRef, filter: &FilterPredicate, ) -> Result<(), ArrowError>
Copy rows selected by
filter from source.Source§fn copy_rows_by_selection(
&mut self,
selection: FilterSelection<'_>,
) -> Result<(), ArrowError>
fn copy_rows_by_selection( &mut self, selection: FilterSelection<'_>, ) -> Result<(), ArrowError>
Copy rows described by a
FilterSelection from the current source array.Auto Trait Implementations§
impl<T> !Freeze for InProgressPrimitiveArray<T>
impl<T> !RefUnwindSafe for InProgressPrimitiveArray<T>
impl<T> !UnwindSafe for InProgressPrimitiveArray<T>
impl<T> Send for InProgressPrimitiveArray<T>
impl<T> Sync for InProgressPrimitiveArray<T>
impl<T> Unpin for InProgressPrimitiveArray<T>where
<T as ArrowPrimitiveType>::Native: Unpin,
impl<T> UnsafeUnpin for InProgressPrimitiveArray<T>
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