pub struct TableScanBuilder<'a> { /* private fields */ }Expand description
Builder to create table scan.
Implementations§
Source§impl<'a> TableScanBuilder<'a>
impl<'a> TableScanBuilder<'a>
Sourcepub fn with_case_sensitive(self, case_sensitive: bool) -> Self
pub fn with_case_sensitive(self, case_sensitive: bool) -> Self
Sets the scan’s case sensitivity
Sourcepub fn with_filter(self, predicate: Predicate) -> Self
pub fn with_filter(self, predicate: Predicate) -> Self
Specifies a predicate to use as a filter
Sourcepub fn select_all(self) -> Self
pub fn select_all(self) -> Self
Select all columns.
Sourcepub fn select_empty(self) -> Self
pub fn select_empty(self) -> Self
Select empty columns.
Sourcepub fn select(
self,
column_names: impl IntoIterator<Item = impl ToString>,
) -> Self
pub fn select( self, column_names: impl IntoIterator<Item = impl ToString>, ) -> Self
Select some columns of the table.
Sourcepub fn with_column_stats(
self,
column_names: impl IntoIterator<Item = impl ToString>,
) -> Self
pub fn with_column_stats( self, column_names: impl IntoIterator<Item = impl ToString>, ) -> Self
Retains the data file’s column statistics for the named columns on each planned
FileScanTask, exposed as FileScanTask::column_stats.
Names resolve against the scan’s schema with the scan’s case sensitivity and must name
primitive fields, such as s.f for a field of struct s. By default, tasks carry no
statistics.
build fails if a name matches no field, matches more than one field when
the scan is case-insensitive, or names a struct, list, map or metadata column.
let scan = table.scan().with_column_stats(["x"]).build()?;
let mut tasks = scan.plan_files().await?;
while let Some(task) = tasks.try_next().await? {
let x = task.schema().field_id_by_name("x").unwrap();
let lower_bound = task
.column_stats()
.and_then(|stats| stats.lower_bounds().get(&x));
}Sourcepub fn snapshot_id(self, snapshot_id: i64) -> Self
pub fn snapshot_id(self, snapshot_id: i64) -> Self
Set the snapshot to scan. The scan projects the schema that snapshot was written with.
The last call to this or Self::as_of_time takes precedence.
If neither is set, the scan reads the current snapshot with the table’s
current schema.
Sourcepub fn as_of_time(self, timestamp_ms: i64) -> Self
pub fn as_of_time(self, timestamp_ms: i64) -> Self
Select a snapshot at or before a timestamp in milliseconds since the Unix epoch.
Uses the table’s main history, and projects the schema the selected snapshot
was written with. The last call to this or Self::snapshot_id takes precedence.
// The snapshot log has entries at 1515100955770 and 1555100955770.
let scan = table.scan().as_of_time(1_555_100_955_769).build()?;
assert_eq!(scan.snapshot().unwrap().snapshot_id(), 3051729675574597004);Sourcepub fn with_concurrency_limit(self, limit: usize) -> Self
pub fn with_concurrency_limit(self, limit: usize) -> Self
Sets manifest file and manifest entry concurrency for file planning.
Sourcepub fn with_manifest_entry_concurrency_limit(self, limit: usize) -> Self
pub fn with_manifest_entry_concurrency_limit(self, limit: usize) -> Self
Sets the manifest entry concurrency limit for this scan
Auto Trait Implementations§
impl<'a> Freeze for TableScanBuilder<'a>
impl<'a> !RefUnwindSafe for TableScanBuilder<'a>
impl<'a> Send for TableScanBuilder<'a>
impl<'a> Sync for TableScanBuilder<'a>
impl<'a> Unpin for TableScanBuilder<'a>
impl<'a> UnsafeUnpin for TableScanBuilder<'a>
impl<'a> !UnwindSafe for TableScanBuilder<'a>
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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