pub struct ParallelExecutor { /* private fields */ }Expand description
Parallel executor.
Implementations§
Source§impl ParallelExecutor
impl ParallelExecutor
Sourcepub fn new(config: ParallelConfig) -> Self
pub fn new(config: ParallelConfig) -> Self
Create a new parallel executor.
Sourcepub fn execute_parallel<F>(
&self,
batches: Vec<RecordBatch>,
func: F,
) -> Result<Vec<RecordBatch>>
pub fn execute_parallel<F>( &self, batches: Vec<RecordBatch>, func: F, ) -> Result<Vec<RecordBatch>>
Execute a function on batches in parallel.
Sourcepub fn partition_batches(
&self,
batches: Vec<RecordBatch>,
num_partitions: usize,
) -> Vec<Vec<RecordBatch>>
pub fn partition_batches( &self, batches: Vec<RecordBatch>, num_partitions: usize, ) -> Vec<Vec<RecordBatch>>
Partition batches for parallel processing.
Sourcepub fn merge_batches(
&self,
batches: Vec<RecordBatch>,
order_by: Option<&[OrderByExpr]>,
) -> Result<Vec<RecordBatch>>
pub fn merge_batches( &self, batches: Vec<RecordBatch>, order_by: Option<&[OrderByExpr]>, ) -> Result<Vec<RecordBatch>>
Merge results from parallel execution.
If order_by is provided, performs k-way merge assuming input batches are already sorted.
Otherwise, simply concatenates the batches.
Auto Trait Implementations§
impl Freeze for ParallelExecutor
impl RefUnwindSafe for ParallelExecutor
impl Send for ParallelExecutor
impl Sync for ParallelExecutor
impl Unpin for ParallelExecutor
impl UnsafeUnpin for ParallelExecutor
impl UnwindSafe for ParallelExecutor
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