pub struct GraphStats<'a> { /* private fields */ }Expand description
Construction goes through GraphStats::new (the ADR-0218 one-
construction idiom the sibling plan-time stats impls use), so an
inline build cannot drift from it.
Implementations§
Source§impl<'a> GraphStats<'a>
impl<'a> GraphStats<'a>
Trait Implementations§
Source§impl PatternStats for GraphStats<'_>
impl PatternStats for GraphStats<'_>
Source§fn range_rows(
&self,
(label, label_token): &NamedToken,
property: &NamedToken,
op: BinaryOp,
bound: &Expr,
) -> Option<u64>
fn range_rows( &self, (label, label_token): &NamedToken, property: &NamedToken, op: BinaryOp, bound: &Expr, ) -> Option<u64>
ADR-0486: the range window’s posting-length count, delegated to
Graph::pattern_range_rows — the same range_seek_cardinality
the executor’s own seek cardinality reads, so the ladder’s price
and the runtime funnel decline together. The bound resolves the
equality_rows way: literals and parameters only, None for
anything else (a temporal literal’s function call included — the
funnel’s eval-resolved bound is the runtime’s, not the
plan-time estimate’s).
Source§fn contains_rows(
&self,
(label, label_token): &NamedToken,
property: &NamedToken,
needle: &Expr,
) -> Option<ContainsCount>
fn contains_rows( &self, (label, label_token): &NamedToken, property: &NamedToken, needle: &Expr, ) -> Option<ContainsCount>
LABS-643: the count is always measurable — the TEXT index’s exact
answer, or without one the sampled estimate
(Graph::pattern_contains_rows) — so only a non-string needle
stays unmeasured (None, the ladder’s fallback). The provenance
stays typed in ContainsCount; the planner compounds the
sampled form’s scan floor on its one scale (ADR-0474). The sample
rides the name-keyed store path like range_rows; an Absent
label is the measurable zero the by-name path answers for a label
never interned.
Source§fn degree_tail(&self, label: &NamedToken, rel_type: &NamedToken) -> Option<u64>
fn degree_tail(&self, label: &NamedToken, rel_type: &NamedToken) -> Option<u64>
LABS-351: the live graph’s histogram tail (the executor keeps the real one; the null stats default None).
Source§fn any_degree_tail(&self, rel_type: Option<&SmallName>) -> Option<u64>
fn any_degree_tail(&self, rel_type: Option<&SmallName>) -> Option<u64>
LABS-991: the live histograms’ any-label tail.
Source§fn degree_moments(
&self,
labels: &[NamedToken],
rel_types: &[NamedToken],
) -> Option<DegreeMoments>
fn degree_moments( &self, labels: &[NamedToken], rel_types: &[NamedToken], ) -> Option<DegreeMoments>
The live histograms’ out-degree moments. Several labels name the
nodes carrying all of them, bounded by each label’s own moments:
the smaller sum is the tighter bound (the degree_tail min
discipline). A name the store never interned selects nothing.
Source§fn in_degree_sum(
&self,
labels: &[NamedToken],
rel_types: &[NamedToken],
) -> Option<u128>
fn in_degree_sum( &self, labels: &[NamedToken], rel_types: &[NamedToken], ) -> Option<u128>
The live pair counts’ in-degree sum, bounded the same way as
[PatternStats::degree_moments]: the smallest per-label sum.
Source§fn label_rows(&self, (name, token): &NamedToken) -> Option<u64>
fn label_rows(&self, (name, token): &NamedToken) -> Option<u64>
label.Source§fn equality_rows(
&self,
(label, label_token): &NamedToken,
property: &NamedToken,
value: &Expr,
) -> Option<u64>
fn equality_rows( &self, (label, label_token): &NamedToken, property: &NamedToken, value: &Expr, ) -> Option<u64>
(label, property).
value is the raw predicate expression. Implementors resolve
literals and parameters with Expr::seek_value and return None
for anything else. None also means no RANGE index, not zero hits.Source§fn rel_type_rows(&self, (name, token): &NamedToken) -> Option<u64>
fn rel_type_rows(&self, (name, token): &NamedToken) -> Option<u64>
rel_type.