pub struct NoPatternStats;Expand description
No counts. Ordering uses the bound / equality / label / bare ranks.
Trait Implementations§
Source§impl Clone for NoPatternStats
impl Clone for NoPatternStats
impl Copy for NoPatternStats
Source§impl Debug for NoPatternStats
impl Debug for NoPatternStats
Source§impl Default for NoPatternStats
impl Default for NoPatternStats
Source§impl PatternStats for NoPatternStats
impl PatternStats for NoPatternStats
Source§fn label_rows(&self, _label: &NamedToken) -> Option<u64>
fn label_rows(&self, _label: &NamedToken) -> Option<u64>
Nodes carrying
label.Source§fn equality_rows(
&self,
_label: &NamedToken,
_property: &NamedToken,
_value: &Expr,
) -> Option<u64>
fn equality_rows( &self, _label: &NamedToken, _property: &NamedToken, _value: &Expr, ) -> Option<u64>
Hits of an equality seek on a RANGE index for
(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 contains_rows(
&self,
_label: &NamedToken,
_property: &NamedToken,
_needle: &Expr,
) -> Option<ContainsCount>
fn contains_rows( &self, _label: &NamedToken, _property: &NamedToken, _needle: &Expr, ) -> Option<ContainsCount>
Candidates of a
CONTAINS filter on (label, property), with the
provenance that says how the count was measured (LABS-643): the
exact hits a TEXT index answered, or — without one — the sampled
estimate carrying the whole-label scan rows the unseekable filter
still pays. needle is the raw predicate expression. Implementors
resolve literals and parameters with Expr::seek_value and
return None for anything else. None means the count is
unmeasurable (a non-string needle), not zero candidates.Source§fn rel_type_rows(&self, _rel_type: &NamedToken) -> Option<u64>
fn rel_type_rows(&self, _rel_type: &NamedToken) -> Option<u64>
Relationships of
rel_type.Source§fn range_rows(
&self,
label: &NamedToken,
property: &NamedToken,
op: BinaryOp,
bound: &Expr,
) -> Option<u64>
fn range_rows( &self, label: &NamedToken, property: &NamedToken, op: BinaryOp, bound: &Expr, ) -> Option<u64>
Hits of a comparison predicate (
<, <=, >, >=) on a RANGE
index for (label, property) — the range window (ADR-0486). The
four comparison ops only: = stays PatternStats::equality_rows’s
domain, and IN and STARTS WITH are deferred. bound 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 on the pair, no order key on the
bound, or unbounded temporal postings — the executor seek’s own
decline conditions, spelled once by the index layer — never zero
hits.Source§fn key_stats(
&self,
_label: &NamedToken,
_property: &NamedToken,
) -> Option<Arc<KeyStats>>
fn key_stats( &self, _label: &NamedToken, _property: &NamedToken, ) -> Option<Arc<KeyStats>>
The value statistics of
property over label’s nodes (the
per-key statistics ADR): count, distinct, minimum, maximum, sum and
the heavy values, with their Provenance. None means
unmeasured: the label’s statistics are not built yet, the key was
declined or evicted, or the pair is unresolved — never zero rows.Source§fn equality_estimate(
&self,
_label: &NamedToken,
_property: &NamedToken,
_value: &Expr,
) -> Option<RowEstimate>
fn equality_estimate( &self, _label: &NamedToken, _property: &NamedToken, _value: &Expr, ) -> Option<RowEstimate>
Rows an equality of
property on label against value selects,
from the key’s statistics (or an index or built pair that answers
exactly), with the provenance of the answer. value is the raw
predicate expression; implementors resolve literals and parameters
with Expr::seek_value and return None for anything else.
Unlike PatternStats::equality_rows, which needs an index, this
prices an unindexed key too; None means unmeasured.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 tail of a (label, rel-type) out-degree distribution —
the conservative floor of the highest observed degree (a log2-bucket
histogram’s top bucket).
None when the stats keep no histogram.
Consumed by apply_degree (LABS-426, the mean-to-tail flip): an
outgoing hop’s fanout rides the tail when the histogram has one,
the mean otherwise — the plan-choice consequence of the flip is
the measured part of that change.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 out-degree tail over every labeled node — the
log2-bucket floor of the highest observed degree of
rel_type
(for None, of any relationship: the per-type tails summed, the
same floor scale, not a strict upper bound). The estimate a hop leaving
an unlabeled node, or crossing an untyped rel, rides when
PatternStats::degree_tail has no (label, type) pair to name.
Nodes carrying no label sit in no histogram and are not covered.
None when the stats keep no histogram.Source§fn degree_moments(
&self,
labels: &[NamedToken],
rel_types: &[NamedToken],
) -> Option<DegreeMoments>
fn degree_moments( &self, labels: &[NamedToken], rel_types: &[NamedToken], ) -> Option<DegreeMoments>
The out-degree moments (
DegreeMoments) of nodes carrying the
labels in labels (empty: every labeled node; several: a bound,
the smallest per-label moments) over the rel types
rel_types (empty: every type). A name the store never interned
selects nothing, so its moments are zero. None when the stats
keep no histogram.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 estimated sum of in-degrees — the relationships arriving at
nodes carrying the labels in
labels (empty: every labeled node;
several: a bound, the smallest per-label sum) over the rel types
rel_types (empty: every type). The incoming side of
PatternStats::degree_moments’ sum, which an undirected or
incoming first hop needs: a label whose rels all point at it has
no out-degree. None when the stats keep no pair counts.Auto Trait Implementations§
impl Forget for NoPatternStats
impl Freeze for NoPatternStats
impl Move for NoPatternStats
impl RefUnwindSafe for NoPatternStats
impl Send for NoPatternStats
impl Sync for NoPatternStats
impl Unpin for NoPatternStats
impl UnsafeUnpin for NoPatternStats
impl UnwindSafe for NoPatternStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more