Skip to main content

NoPatternStats

Struct NoPatternStats 

Source
pub struct NoPatternStats;
Expand description

No counts. Ordering uses the bound / equality / label / bare ranks.

Trait Implementations§

Source§

impl Clone for NoPatternStats

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for NoPatternStats

Source§

impl Debug for NoPatternStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NoPatternStats

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PatternStats for NoPatternStats

Source§

fn label_rows(&self, _label: &NamedToken) -> Option<u64>

Nodes carrying label.
Source§

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>

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>

Relationships of rel_type.
Source§

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>>

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>

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>

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>

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>

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>

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.