Skip to main content

EntityGraphProvider

Trait EntityGraphProvider 

Source
pub trait EntityGraphProvider: Send + Sync {
    // Required methods
    fn scan_entities<'life0, 'life1, 'async_trait>(
        &'life0 self,
        catalog: &'life1 str,
        request: ScanRequest,
        query_ctx: Option<QueryContextRef>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<SendableRecordBatchStream>, BoxedError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn scan_relationships<'life0, 'life1, 'async_trait>(
        &'life0 self,
        catalog: &'life1 str,
        request: ScanRequest,
        query_ctx: Option<QueryContextRef>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<SendableRecordBatchStream>, BoxedError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Produces the rows of the computed entity-graph tables at read time.

Implemented above the query engine (in the frontend) and injected into the catalog manager after construction — the provider needs the engine, which needs the catalog manager — so this late binding breaks the catalog -> query dependency cycle.

query_ctx is the outer query’s context, captured when the computed table is resolved: the derivation must read only sources that context may read and execute under it, inheriting the caller’s permissions, cancellation and deadline (the RFC’s derivation contract). None (context-less internal resolution) keeps the provider’s default behaviour.

Required Methods§

Source

fn scan_entities<'life0, 'life1, 'async_trait>( &'life0 self, catalog: &'life1 str, request: ScanRequest, query_ctx: Option<QueryContextRef>, ) -> Pin<Box<dyn Future<Output = Result<Option<SendableRecordBatchStream>, BoxedError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Produces the entity registry (semantic_entities) rows for catalog. None means no source table declared an entity.

Source

fn scan_relationships<'life0, 'life1, 'async_trait>( &'life0 self, catalog: &'life1 str, request: ScanRequest, query_ctx: Option<QueryContextRef>, ) -> Pin<Box<dyn Future<Output = Result<Option<SendableRecordBatchStream>, BoxedError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Produces the relationship set (semantic_relationships) rows for catalog.

Implementors§