pub struct TableMapping {
pub table: String,
pub mode: SyncMode,
pub pipeline: Vec<PipelineStep>,
pub columns: Vec<String>,
pub filter: Option<RowFilter>,
}Fields§
§table: StringFully qualified table name as Spark sees it.
mode: SyncMode§pipeline: Vec<PipelineStep>§columns: Vec<String>Projection override. The columns the source is allowed to read. Empty
(the default) means derive it from the pipeline — see
projected_columns — which is what you
want almost always; set it only to read a column the pipeline does not
name (a custom transform’s input, say).
columns: [id, name, country]filter: Option<RowFilter>Predicate pushdown. An optional row filter pushed into the Iceberg scan planner, so partitions / data files / row groups that cannot match are never opened.
filter: { column: country, eq: SE }Implementations§
Source§impl TableMapping
impl TableMapping
Sourcepub fn projected_columns(&self) -> Option<Vec<String>>
pub fn projected_columns(&self) -> Option<Vec<String>>
The columns this mapping actually touches — the projection a source may prune to.
Every declarative step names its inputs exactly: a vertex reads its
id_column plus its properties; an edge/fk_edges reads its two
endpoint columns plus its properties. A mapping that builds a Person
node out of (id, name) therefore needs 2 of the table’s columns — and
until the projection was wired, the Iceberg source read all of them
on every snapshot change.
Returns None when the projection would be UNSOUND:
- a
customstep is an opaque registry transform that may read any column, so pruning could starve it; - an explicit
columnsoverride is absent AND the derived set is empty (nothing to prune to).
None means “read every column”, i.e. the previous behaviour — the
projection is a strict optimisation that can only ever narrow a read it
is provably safe to narrow.
Trait Implementations§
Source§impl Clone for TableMapping
impl Clone for TableMapping
Source§impl Debug for TableMapping
impl Debug for TableMapping
Source§impl<'de> Deserialize<'de> for TableMapping
impl<'de> Deserialize<'de> for TableMapping
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TableMapping
impl RefUnwindSafe for TableMapping
impl Send for TableMapping
impl Sync for TableMapping
impl Unpin for TableMapping
impl UnsafeUnpin for TableMapping
impl UnwindSafe for TableMapping
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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