pub struct ScanBuilder { /* private fields */ }Expand description
Builder to scan a snapshot of a table.
Implementations§
Source§impl ScanBuilder
impl ScanBuilder
Sourcepub fn new(snapshot: impl Into<Arc<KernelSnapshot>>) -> Self
pub fn new(snapshot: impl Into<Arc<KernelSnapshot>>) -> Self
Create a new ScanBuilder instance.
Sourcepub fn with_schema(self, schema: SchemaRef) -> Self
pub fn with_schema(self, schema: SchemaRef) -> Self
Sourcepub fn with_schema_opt(self, schema_opt: Option<SchemaRef>) -> Self
pub fn with_schema_opt(self, schema_opt: Option<SchemaRef>) -> Self
Optionally provide a SchemaRef for columns to select from the Snapshot. See
ScanBuilder::with_schema for details. If schema_opt is None this is a no-op.
Sourcepub fn with_predicate(self, predicate: impl Into<Option<PredicateRef>>) -> Self
pub fn with_predicate(self, predicate: impl Into<Option<PredicateRef>>) -> Self
Optionally provide an expression to filter rows. For example, using the predicate x < 4 to return a subset of the rows in the scan which satisfy the filter. If predicate_opt
is None, this is a no-op.
NOTE: The filtering is best-effort and can produce false positives (rows that should should have been filtered out but were kept).
Sourcepub fn with_skip_stats(self, skip_stats: bool) -> Self
pub fn with_skip_stats(self, skip_stats: bool) -> Self
Skip file statistics during kernel log replay.
Set true to make the kernel skip minimum and maximum values plus null counts.
The kernel disables predicate pruning, including partition pruning. Scan metadata keeps
each active file for predicates that depend on file data. Readers must apply the predicate.
Set false to remove a prior override. The builder infers statistics materialization and
enables kernel pruning.
Sourcepub fn build(self) -> DeltaResult<Scan>
pub fn build(self) -> DeltaResult<Scan>
Finalize the builder into a Scan, validating the configured schema and predicate.
Sourcepub fn with_kernel_all_struct_stats(self) -> Self
pub fn with_kernel_all_struct_stats(self) -> Self
Experimental: Use kernel’s all_struct statistics mode (AFFECTS ULP). This is a preview of the modernization - use for experimentation.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ScanBuilder
impl !UnwindSafe for ScanBuilder
impl Forget for ScanBuilder
impl Freeze for ScanBuilder
impl Send for ScanBuilder
impl Sync for ScanBuilder
impl Unpin for ScanBuilder
impl UnsafeUnpin for ScanBuilder
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