#[non_exhaustive]pub enum FallbackReason {
NoSchema,
PartitionKeyNotFullyConstrained,
PartitionKeyEncodingFailed,
MetadataScanPath,
LegacyExecutorPath,
ForcedFullScan,
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
A WRITETIME/TTL metadata projection with NO usable partition-key
restriction full-scans (there is no key to target). A fully-constrained
WHERE pk = ? now routes through AccessPath::MetadataPartitionLookup
(#962) and WHERE pk IN (...) fans out to AccessPath::MultiPartitionLookup
(#1916); this reason is reserved for the genuinely unclassifiable metadata
scan that remains.
LegacyExecutorPath
The legacy QueryExecutor issues an unconditional storage.scan; it does
not consult the fast path. Since issue #1750 ad-hoc SELECTs route through
the modern executor, so this reason now covers the remaining legacy SELECT
surfaces (a cached legacy SELECT plan reused via the plan-cache HIT branch).
Tracked by #962 (route the legacy/prepared surfaces through the modern
executor) and #961 (param binding).
ForcedFullScan
The operator forced the full-scan path via the read-path forcing knob
(CQLITE_READ_PATH=full or crate::config::ReadPathMode::Full, issue
#1918). This is a forced fallback, distinct from every organic reason so
a deliberately-forced full scan is never mistaken for one the classifier
chose on its own. The rows are byte-identical to the auto result for the
same query — forcing governs routing only, never decoding.
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§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§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.