pub enum ContainsCount {
TextIndex(u64),
SampleScan {
rows: u64,
scan: u64,
},
}Expand description
Provenance of a plan-time CONTAINS candidate count (LABS-643): the
TEXT index stays the one exact measurement, and without one the count
comes from a bounded sample scan of the label’s nodes — exact when the
label fits inside the sampler’s bound, an extrapolation beyond it. The
variant, never a bare number, says which: no consumer can mistake the
extrapolation for the measurement, and the sampled form carries the
whole-label scan rows the unseekable filter still pays — the floor the
compound start estimate (ADR-0474) maxes with the
sampled output.
The sampler lives in the executor; the type lives here because the
PatternStats::contains_rows contract is the one place both the
planner’s pattern ordering and the executor’s start selection consume
it, and the executor re-exports it so its own construction sites and
tests keep one canonical path.
Variants§
TextIndex(u64)
Exact hit count a TEXT index on (label, property) answered.
SampleScan
A bounded sample scan’s estimate: rows is the output estimate —
the exact count when the label’s index bucket holds at most the
sample bound, otherwise matches * bucket_rows / scanned, floored
at a divisor of the bucket — and scan is the bucket’s whole row
count, the label scan the unindexed filter pays before any match.
Implementations§
Trait Implementations§
Source§impl Clone for ContainsCount
impl Clone for ContainsCount
Source§fn clone(&self) -> ContainsCount
fn clone(&self) -> ContainsCount
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ContainsCount
Source§impl Debug for ContainsCount
impl Debug for ContainsCount
impl Eq for ContainsCount
Source§impl PartialEq for ContainsCount
impl PartialEq for ContainsCount
impl StructuralPartialEq for ContainsCount
Auto Trait Implementations§
impl Forget for ContainsCount
impl Freeze for ContainsCount
impl Move for ContainsCount
impl RefUnwindSafe for ContainsCount
impl Send for ContainsCount
impl Sync for ContainsCount
impl Unpin for ContainsCount
impl UnsafeUnpin for ContainsCount
impl UnwindSafe for ContainsCount
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.