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;
fn table_declarations(
&self,
table_info: &TableInfo,
) -> Vec<TableEntityDeclaration>;
}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§
Sourcefn 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_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.
Sourcefn 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,
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.
Sourcefn table_declarations(
&self,
table_info: &TableInfo,
) -> Vec<TableEntityDeclaration>
fn table_declarations( &self, table_info: &TableInfo, ) -> Vec<TableEntityDeclaration>
The entities table_info contributes to the graph: its explicit
declarations merged with the ones the conventions derive. Metadata-only
by contract — it runs per table on the table_semantics scan and must
not touch the query engine.