pub struct TableSpec {
pub table: String,
pub mode: SyncMode,
pub columns: Vec<String>,
pub filter: Option<RowFilter>,
}Expand description
What the listener asks a source each round.
columns + filter are the pushdown half of the ask: they say what the
round actually needs, so a source that can prune (the Iceberg one) reads only
that. A source that cannot prune ignores them and returns everything — the
batches are then a superset, which every downstream transform already
tolerates (they project what they name).
Fields§
§table: String§mode: SyncMode§columns: Vec<String>The projection: columns the round needs. Empty = every column, which
is the pre-pushdown behaviour. Derived from the mapping’s pipeline by
TableMapping::projected_columns.
filter: Option<RowFilter>An optional row predicate to push into the scan planner (partition / data
file / row-group pruning). None = no filter.
Implementations§
Source§impl TableSpec
impl TableSpec
Sourcepub fn new(table: impl Into<String>, mode: SyncMode) -> Self
pub fn new(table: impl Into<String>, mode: SyncMode) -> Self
The pre-pushdown ask: this table, this mode, every column, no filter.
Sourcepub fn with_columns(self, columns: Vec<String>) -> Self
pub fn with_columns(self, columns: Vec<String>) -> Self
Narrow the read to columns (empty leaves it unprojected).
Sourcepub fn with_filter(self, filter: Option<RowFilter>) -> Self
pub fn with_filter(self, filter: Option<RowFilter>) -> Self
Push filter into the scan planner.
Sourcepub fn column_refs(&self) -> Vec<&str>
pub fn column_refs(&self) -> Vec<&str>
columns as the &[&str] the skade read API takes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableSpec
impl RefUnwindSafe for TableSpec
impl Send for TableSpec
impl Sync for TableSpec
impl Unpin for TableSpec
impl UnsafeUnpin for TableSpec
impl UnwindSafe for TableSpec
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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