#[non_exhaustive]pub enum FallbackReason {
NoSchema,
PartitionKeyNotFullyConstrained,
PartitionKeyEncodingFailed,
MetadataScanPath,
LegacyExecutorPath,
TombstonesBuildNoPrune,
}Expand description
The documented, closed set of reasons a SELECT fell back to a full scan.
Keep this list in sync with docs/access-paths.md. Adding a variant is a
public-contract change: it documents a new, known reason a query cannot use
a targeted path. It must never be used to paper over an unexpected fallback —
an unexpected fallback should surface as a failing access-path assertion.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoSchema
No schema was available, so the partition-key columns cannot be identified to build a targeted lookup.
PartitionKeyNotFullyConstrained
The WHERE clause does not fully constrain the partition key with equality (partial key, no restriction, or a non-equality restriction such as a range). Mirrors Cassandra’s single-partition-read requirement.
PartitionKeyEncodingFailed
The fully-constrained partition-key values could not be encoded to the on-disk key form (e.g. a type mismatch). A full scan is the safe fallback.
MetadataScanPath
The WRITETIME/TTL metadata-projection path always full-scans today; it
does not yet route through a partition-targeted lookup. Pinned by tests
so #962 can flip it to AccessPath::MetadataPartitionLookup.
LegacyExecutorPath
The legacy QueryExecutor (simple-id-lookup and prepared SELECTs) issues
an unconditional storage.scan; it does not consult the fast path.
Tracked by #962 (route the legacy/prepared surfaces through the modern
executor) and #961 (param binding).
TombstonesBuildNoPrune
The tombstones build compiles out the partition-targeted prune. On that
build the targeted storage surfaces (scan_partition,
scan_partition_with_cell_metadata) are full-scan + retain fallbacks with
NO bloom/BTI SSTable pruning, so a fully-constrained WHERE pk = ? (or
IN (...)/WRITETIME-TTL) opens the whole table even though the rows are
byte-identical to the pruned build. The executor reports this honest reason
(rather than a fake targeted label) whenever the storage call returns
engaged == false (Epic #951, honest access paths).
Implementations§
Trait Implementations§
Source§impl Clone for FallbackReason
impl Clone for FallbackReason
Source§fn clone(&self) -> FallbackReason
fn clone(&self) -> FallbackReason
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 FallbackReason
Source§impl Debug for FallbackReason
impl Debug for FallbackReason
Source§impl<'de> Deserialize<'de> for FallbackReason
impl<'de> Deserialize<'de> for FallbackReason
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>,
impl Eq for FallbackReason
Source§impl PartialEq for FallbackReason
impl PartialEq for FallbackReason
Source§fn eq(&self, other: &FallbackReason) -> bool
fn eq(&self, other: &FallbackReason) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for FallbackReason
impl Serialize for FallbackReason
impl StructuralPartialEq for FallbackReason
Auto Trait Implementations§
impl Freeze for FallbackReason
impl RefUnwindSafe for FallbackReason
impl Send for FallbackReason
impl Sync for FallbackReason
impl Unpin for FallbackReason
impl UnsafeUnpin for FallbackReason
impl UnwindSafe for FallbackReason
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.