#[non_exhaustive]pub enum AccessPath {
FullScan,
PartitionLookup,
MultiPartitionLookup,
ClusteringSlice,
MetadataPartitionLookup,
StreamingPartitionLookup,
FallbackFullScan {
reason: FallbackReason,
},
}Expand description
The access path a SELECT surface selected for a single SSTable-scan step.
This is the public, testable signal. Variant names are a shared contract with
#958 (work counters) and #962 (fast-path unification); do not rename without
updating those consumers and docs/access-paths.md.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FullScan
Every SSTable for the table is scanned and rows are filtered in memory. This is the honest baseline when no usable restriction is present.
PartitionLookup
A single, fully-constrained partition (WHERE pk = ?) is served by a
partition-targeted lookup that prunes SSTables (bloom/BTI presence) before
scanning. Materializing path (#949 fast path).
MultiPartitionLookup
Several fully-constrained partitions (WHERE pk IN (...) / token fan-out)
are served by repeated partition-targeted lookups. Reserved for #955; not
yet produced by any surface, but named here so #955 can consume it.
ClusteringSlice
A partition is targeted and a clustering-key predicate
(WHERE pk = ? AND ck </>/= ?) prunes rows within the partition. Reserved
for #954; not yet produced by any surface.
MetadataPartitionLookup
The WRITETIME/TTL metadata-projection path resolved a single fully
constrained partition via a targeted lookup (#962). The WHERE pk IN (...)
metadata fan-out reports Self::MultiPartitionLookup instead (#1916).
StreamingPartitionLookup
The streaming SELECT path served a single fully-constrained partition via a
partition-targeted lookup (the streaming analogue of Self::PartitionLookup).
FallbackFullScan
A targeted path was not selected and execution fell back to a full scan.
The reason is from the documented closed set FallbackReason, so an
accidental fallback cannot look like a targeted success.
Fields
reason: FallbackReasonWhy the targeted path was not taken.
Implementations§
Source§impl AccessPath
impl AccessPath
Sourcepub fn is_full_scan(&self) -> bool
pub fn is_full_scan(&self) -> bool
True if this path scans the whole table (full scan or any fallback to one).
Tests use this to assert “this query did NOT do a full scan” without matching every fallback reason.
Sourcepub fn is_targeted(&self) -> bool
pub fn is_targeted(&self) -> bool
True if this path targeted one or more specific partitions rather than scanning the whole table.
Trait Implementations§
Source§impl Clone for AccessPath
impl Clone for AccessPath
Source§fn clone(&self) -> AccessPath
fn clone(&self) -> AccessPath
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AccessPath
impl Debug for AccessPath
Source§impl<'de> Deserialize<'de> for AccessPath
impl<'de> Deserialize<'de> for AccessPath
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for AccessPath
impl Display for AccessPath
impl Eq for AccessPath
Source§impl PartialEq for AccessPath
impl PartialEq for AccessPath
Source§impl Serialize for AccessPath
impl Serialize for AccessPath
impl StructuralPartialEq for AccessPath
Auto Trait Implementations§
impl Freeze for AccessPath
impl RefUnwindSafe for AccessPath
impl Send for AccessPath
impl Sync for AccessPath
impl Unpin for AccessPath
impl UnsafeUnpin for AccessPath
impl UnwindSafe for AccessPath
Blanket Implementations§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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.