Skip to main content

LookupSourceDyn

Trait LookupSourceDyn 

Source
pub trait LookupSourceDyn: Send + Sync {
    // Required methods
    fn query_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        keys: &'life1 [&'life2 [u8]],
        predicates: &'life3 [Predicate],
        projection: &'life4 [ColumnId],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<RecordBatch>>, LookupError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
    fn schema(&self) -> SchemaRef;
}
Expand description

Dyn-compatible version of LookupSource for use as Arc<dyn LookupSourceDyn>.

LookupSource uses RPITIT which is not dyn-compatible. This trait uses async_trait boxing instead, suitable for the cold path (cache miss → source query).

Required Methods§

Source

fn query_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, keys: &'life1 [&'life2 [u8]], predicates: &'life3 [Predicate], projection: &'life4 [ColumnId], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<RecordBatch>>, LookupError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Query the source by keys, predicates, and/or projection.

Source

fn schema(&self) -> SchemaRef

Arrow schema of the data this source returns.

Implementors§