pub trait ColumnStatsReader: Send + Sync {
// Provided methods
fn vertex_column_stats(
&self,
_space: &str,
_tag: &str,
_column: &str,
) -> Option<Arc<ColumnStatsSnapshot>> { ... }
fn edge_column_stats(
&self,
_space: &str,
_edge_type: &str,
_column: &str,
) -> Option<Arc<ColumnStatsSnapshot>> { ... }
fn vertex_table_stats(
&self,
_space: &str,
_tag: &str,
) -> Option<Arc<TableCardinalitySnapshot>> { ... }
fn edge_table_stats(
&self,
_space: &str,
_edge_type: &str,
) -> Option<Arc<TableCardinalitySnapshot>> { ... }
fn stats_epoch(&self) -> u64 { ... }
}Expand description
Reader capability for optimizer-facing column statistics snapshots.
relation addressing follows the catalog naming: a tag name for vertex
columns and an edge type name for edge columns.
Provided Methods§
Sourcefn vertex_column_stats(
&self,
_space: &str,
_tag: &str,
_column: &str,
) -> Option<Arc<ColumnStatsSnapshot>>
fn vertex_column_stats( &self, _space: &str, _tag: &str, _column: &str, ) -> Option<Arc<ColumnStatsSnapshot>>
Snapshot of one property column of tag inside space.
Sourcefn edge_column_stats(
&self,
_space: &str,
_edge_type: &str,
_column: &str,
) -> Option<Arc<ColumnStatsSnapshot>>
fn edge_column_stats( &self, _space: &str, _edge_type: &str, _column: &str, ) -> Option<Arc<ColumnStatsSnapshot>>
Snapshot of one property column of edge_type inside space.
Sourcefn vertex_table_stats(
&self,
_space: &str,
_tag: &str,
) -> Option<Arc<TableCardinalitySnapshot>>
fn vertex_table_stats( &self, _space: &str, _tag: &str, ) -> Option<Arc<TableCardinalitySnapshot>>
Table-level cardinality of vertex tag tag inside space.
Sourcefn edge_table_stats(
&self,
_space: &str,
_edge_type: &str,
) -> Option<Arc<TableCardinalitySnapshot>>
fn edge_table_stats( &self, _space: &str, _edge_type: &str, ) -> Option<Arc<TableCardinalitySnapshot>>
Table-level cardinality of edge type edge_type inside space.
Served by the engine from per-partition snapshot counts merged with
TableCardinalitySnapshot::absorb; absent only when the edge type
has no partitions. Costing falls back to live edge counts when
unavailable.
Sourcefn stats_epoch(&self) -> u64
fn stats_epoch(&self) -> u64
Monotonic data-version stamp: changes whenever data has been written, independent of schema changes. Used by the optimizer’s statistics cache to detect stale estimates after DML.
Contract: 0 means “no writes observed / unknown” and is reserved;
engines backed by real data must return values that strictly increase
across DML (they may start at any value > 0). Consumers must treat a
return value of 0 as “cacheability unknown” rather than as a valid
epoch. Returns 0 when unknown.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".