Skip to main content

InProgressArray

Trait InProgressArray 

Source
trait InProgressArray:
    Debug
    + Send
    + Sync {
    // Required methods
    fn set_source(&mut self, source: Option<ArrayRef>);
    fn copy_rows(&mut self, offset: usize, len: usize) -> Result<(), ArrowError>;
    fn finish(&mut self) -> Result<ArrayRef, ArrowError>;

    // Provided methods
    fn copy_rows_by_filter(
        &mut self,
        filter: &FilterPredicate,
    ) -> Result<(), ArrowError> { ... }
    fn copy_rows_by_filter_from(
        &mut self,
        source: ArrayRef,
        filter: &FilterPredicate,
    ) -> Result<(), ArrowError> { ... }
    fn copy_rows_by_selection(
        &mut self,
        selection: FilterSelection<'_>,
    ) -> Result<(), ArrowError> { ... }
}
Expand description

Incrementally builds up arrays

GenericInProgressArray is the default implementation that buffers arrays and uses other kernels concatenates them when finished.

Some types have specialized implementations for this array types (e.g., StringViewArray, etc.).

Required Methods§

Source

fn set_source(&mut self, source: Option<ArrayRef>)

Set the source array.

Calls to Self::copy_rows will copy rows from this array into the current in-progress array

Source

fn copy_rows(&mut self, offset: usize, len: usize) -> Result<(), ArrowError>

Copy rows from the current source array into the in-progress array

The source array is set by Self::set_source.

Return an error if the source array is not set

Source

fn finish(&mut self) -> Result<ArrayRef, ArrowError>

Finish the currently in-progress array and return it as an ArrayRef

Provided Methods§

Source

fn copy_rows_by_filter( &mut self, filter: &FilterPredicate, ) -> Result<(), ArrowError>

Copy rows selected by filter from the current source array.

Source

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>

Copy rows described by a FilterSelection from the current source array.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§