Struct ScanBuilder

Source
pub struct ScanBuilder<A> { /* private fields */ }
Expand description

A struct for building a scan operation.

Implementations§

Source§

impl<A: 'static + Send> ScanBuilder<A>

Source

pub fn with_filter(self, filter: ExprRef) -> Self

Source

pub fn with_some_filter(self, filter: Option<ExprRef>) -> Self

Source

pub fn with_projection(self, projection: ExprRef) -> Self

Source

pub fn with_row_range(self, row_range: Range<u64>) -> Self

Source

pub fn with_selection(self, selection: Selection) -> Self

Source

pub fn with_row_indices(self, row_indices: Buffer<u64>) -> Self

Source

pub fn with_row_offset(self, row_offset: u64) -> Self

Source

pub fn with_split_by(self, split_by: SplitBy) -> Self

Source

pub fn with_concurrency(self, concurrency: usize) -> Self

The number of row splits to make progress on concurrently, must be greater than 0.

Source

pub fn with_tokio_executor(self, handle: Handle) -> Self

Spawn each CPU task onto the given Tokio runtime.

Note that this is an odd use of the Tokio runtime. Typically, it is used predominantly for I/O bound tasks.

Source

pub fn with_executor(self, executor: Arc<dyn TaskExecutor>) -> Self

Source

pub fn with_metrics(self, metrics: VortexMetrics) -> Self

Source

pub fn with_limit(self, limit: usize) -> Self

Source

pub fn dtype(&self) -> VortexResult<DType>

The DType returned by the scan, after applying the projection.

Source

pub fn map<B: 'static>( self, map_fn: impl Fn(A) -> VortexResult<B> + 'static + Send + Sync, ) -> ScanBuilder<B>

Map each split of the scan. The function will be run on the spawned task.

Source

pub fn build( self, ) -> VortexResult<Vec<BoxFuture<'static, VortexResult<Option<A>>>>>

Constructs a task per row split of the scan, returned as a vector of futures.

Source

pub fn into_stream( self, ) -> VortexResult<impl Stream<Item = VortexResult<A>> + 'static>

Source

pub fn into_thread_pool_iter( self, pool: ThreadPool, ) -> VortexResult<impl Iterator<Item = VortexResult<A>> + Send + 'static>

Returns a blocking iterator over the scan, where tasks perform CPU work on the provided thread pool.

Source§

impl ScanBuilder<ArrayRef>

Source

pub fn new(layout_reader: Arc<dyn LayoutReader>) -> Self

Source

pub fn map_to_record_batch(self, schema: SchemaRef) -> ScanBuilder<RecordBatch>

Map the scan into a stream of Arrow RecordBatch.

Source

pub fn into_array_stream(self) -> VortexResult<impl ArrayStream + 'static>

Returns a stream over the scan with each CPU task polled on the current thread as per the behaviour of futures::stream::Buffered.

Source

pub fn into_array_iter( self, ) -> VortexResult<impl ArrayIterator + Send + Clone + 'static>

Returns a thread-safe ArrayIterator that can be cloned and passed to other threads to make progress on the same scan concurrently.

Within each thread, the array chunks will be emitted in the original order they are within the scan. Between threads, the order is not guaranteed.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,