Skip to main content

TableSource

Trait TableSource 

Source
pub trait TableSource {
    // Required method
    fn batches(&self, table: &str) -> &[RecordBatch];
}
Expand description

A source of Arrow batches keyed by fully-qualified table name — the seam the offline rel2graph engine reads from.

Implemented by anything that can produce a table’s rows as Arrow: the bench’s GeneratedDb, the in-memory ArrowTables (a parquet-directory load or an Iceberg scan collected into memory), or a bespoke adapter. build_mutation asks only for batches(table); an unknown table returns an empty slice and is skipped, so a source may legitimately carry a superset of the spec’s tables.

Required Methods§

Source

fn batches(&self, table: &str) -> &[RecordBatch]

The batches for table, or an empty slice if the source has no such table.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: TableSource + ?Sized> TableSource for &T

A shared reference to a TableSource is itself a TableSource, so &db/&tables can be passed where an owned source is not convenient.

Source§

fn batches(&self, table: &str) -> &[RecordBatch]

Implementors§