pub struct ScanBuilder<A> { /* private fields */ }
Expand description
A struct for building a scan operation.
Implementations§
Source§impl<A> ScanBuilder<A>where
A: 'static + Send,
impl<A> ScanBuilder<A>where
A: 'static + Send,
pub fn with_filter(self, filter: Arc<dyn VortexExpr>) -> ScanBuilder<A>
pub fn with_some_filter( self, filter: Option<Arc<dyn VortexExpr>>, ) -> ScanBuilder<A>
pub fn with_projection(self, projection: Arc<dyn VortexExpr>) -> ScanBuilder<A>
pub fn with_row_range(self, row_range: Range<u64>) -> ScanBuilder<A>
pub fn with_some_row_range( self, row_range: Option<Range<u64>>, ) -> ScanBuilder<A>
pub fn with_selection(self, selection: Selection) -> ScanBuilder<A>
pub fn with_row_indices(self, row_indices: Buffer<u64>) -> ScanBuilder<A>
pub fn with_split_by(self, split_by: SplitBy) -> ScanBuilder<A>
Sourcepub fn with_concurrency(self, concurrency: usize) -> ScanBuilder<A>
pub fn with_concurrency(self, concurrency: usize) -> ScanBuilder<A>
The number of row splits to make progress on concurrently, must be greater than 0.
pub fn with_metrics(self, metrics: VortexMetrics) -> ScanBuilder<A>
Sourcepub fn map<B>(
self,
map_fn: impl Fn(A) -> Result<B, VortexError> + Send + Sync + 'static,
) -> ScanBuilder<B>where
B: 'static,
pub fn map<B>(
self,
map_fn: impl Fn(A) -> Result<B, VortexError> + Send + Sync + 'static,
) -> ScanBuilder<B>where
B: 'static,
Map each split of the scan. The function will be run on the spawned task.
Sourcepub fn build(
self,
) -> Result<Vec<impl Future<Output = Result<Option<A>, VortexError>>>, VortexError>
pub fn build( self, ) -> Result<Vec<impl Future<Output = Result<Option<A>, VortexError>>>, VortexError>
Constructs a task per row split of the scan, returned as a vector of futures.
Sourcepub fn into_stream(
self,
) -> Result<impl Stream<Item = Result<A, VortexError>> + 'static, VortexError>
pub fn into_stream( self, ) -> Result<impl Stream<Item = Result<A, VortexError>> + 'static, VortexError>
Returns a stream over the scan objects.
Source§impl ScanBuilder<Arc<dyn Array>>
impl ScanBuilder<Arc<dyn Array>>
pub fn new(layout_reader: Arc<dyn LayoutReader>) -> ScanBuilder<Arc<dyn Array>>
Sourcepub fn map_to_record_batch(
self,
schema: Arc<Schema>,
) -> ScanBuilder<RecordBatch>
pub fn map_to_record_batch( self, schema: Arc<Schema>, ) -> ScanBuilder<RecordBatch>
Map the scan into a stream of Arrow RecordBatch
.
Sourcepub fn into_array_stream(
self,
) -> Result<impl ArrayStream + 'static, VortexError>
pub fn into_array_stream( self, ) -> Result<impl ArrayStream + 'static, VortexError>
Returns a stream over the scan with each CPU task polled on the current thread as per
the behaviour of futures::stream::Buffered
.
Sourcepub fn into_array_iter(
self,
) -> Result<impl ArrayIterator + 'static, VortexError>
pub fn into_array_iter( self, ) -> Result<impl ArrayIterator + 'static, VortexError>
Returns a blocking iterator over the scan.
All work will be performed on the current thread, with tasks interleaved per the configured concurrency. Any configured executor will be ignored.
Auto Trait Implementations§
impl<A> !Freeze for ScanBuilder<A>
impl<A> !RefUnwindSafe for ScanBuilder<A>
impl<A> Send for ScanBuilder<A>
impl<A> Sync for ScanBuilder<A>
impl<A> Unpin for ScanBuilder<A>
impl<A> !UnwindSafe for ScanBuilder<A>
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