pub struct Scan { /* private fields */ }Expand description
A configured, executable scan over a table snapshot.
Produced by ScanBuilder::build; drives log replay to enumerate the data files (and the
statistics materialization strategy) that satisfy the scan’s schema and predicate.
Implementations§
Source§impl Scan
impl Scan
Sourcepub fn table_root(&self) -> &Url
pub fn table_root(&self) -> &Url
The table’s root URL. Any relative paths returned from scan_data (or in a callback from
ScanMetadata::visit_scan_files) must be resolved against this root to get the actual path to
the file.
Sourcepub fn snapshot(&self) -> &SnapshotRef
pub fn snapshot(&self) -> &SnapshotRef
Get a shared reference to the Snapshot of this scan.
Sourcepub fn logical_schema(&self) -> &SchemaRef
pub fn logical_schema(&self) -> &SchemaRef
Get a shared reference to the logical Schema of the scan (i.e. the output schema of the
scan). Note that the logical schema can differ from the physical schema due to e.g.
partition columns which are present in the logical schema but not in the physical schema.
Sourcepub fn physical_schema(&self) -> &SchemaRef
pub fn physical_schema(&self) -> &SchemaRef
Get a shared reference to the physical Schema of the scan. This represents the schema
of the underlying data files which must be read from storage.
Sourcepub fn physical_predicate(&self) -> Option<PredicateRef>
pub fn physical_predicate(&self) -> Option<PredicateRef>
Get the predicate PredicateRef of the scan.
Returns the predicate pushed down to the physical scan, if any was derived.
Sourcepub fn scan_metadata(
&self,
engine: Arc<dyn Engine>,
) -> SendableScanMetadataStream
pub fn scan_metadata( &self, engine: Arc<dyn Engine>, ) -> SendableScanMetadataStream
Stream the per-file ScanMetadata for this scan, driving log replay on engine.
Sourcepub fn scan_metadata_from<T: Iterator<Item = RecordBatch> + Send + 'static>(
&self,
engine: Arc<dyn Engine>,
existing_version: Version,
existing_data: Box<T>,
existing_predicate: Option<PredicateRef>,
) -> SendableScanMetadataStream
pub fn scan_metadata_from<T: Iterator<Item = RecordBatch> + Send + 'static>( &self, engine: Arc<dyn Engine>, existing_version: Version, existing_data: Box<T>, existing_predicate: Option<PredicateRef>, ) -> SendableScanMetadataStream
Stream ScanMetadata incrementally starting from a previously observed state.
Given the data already known at existing_version (and the predicate used to produce it),
only the log changes since that version are replayed, avoiding a full scan when refreshing
an already-loaded snapshot.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Scan
impl !UnwindSafe for Scan
impl Forget for Scan
impl Freeze for Scan
impl Send for Scan
impl Sync for Scan
impl Unpin for Scan
impl UnsafeUnpin for Scan
Blanket Implementations§
Source§impl<T> AsAny for T
impl<T> AsAny for T
Source§fn any_ref(&self) -> &(dyn Any + Send + Sync + 'static)
fn any_ref(&self) -> &(dyn Any + Send + Sync + 'static)
dyn Any reference to the object: Read moreSource§fn as_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ
fn as_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ
Arc<dyn Any> reference to the object: Read moreSource§fn into_any(self: Box<T>) -> Box<dyn Any + Send + Sync>
fn into_any(self: Box<T>) -> Box<dyn Any + Send + Sync>
Box<dyn Any>: Read moreSource§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
std::any::type_name, since Any does not provide it and
Any::type_id is useless as a debugging aid (its Debug is just a mess of hex digits).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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FoldWithOption for T
impl<T> FoldWithOption for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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