pub struct PartitionKeyShape {
pub partition_key_count: usize,
pub clustering_key_count: usize,
pub non_key_column_names: HashSet<String>,
pub single_pk_component: Option<PartitionKeyComponent>,
}Expand description
The AUTHORITATIVE partition-key shape of a table, derived schema-less from the SSTable Statistics.db SerializationHeader (issue #1750).
Carries ONLY facts Cassandra actually serialises: how many partition-key components and clustering keys the table has, and the REAL names of the non-key (regular + static) columns. The partition-/clustering-key column NAMES are deliberately absent — Cassandra never serialises them, so any pk-name a schema-less parser reports is a synthesised placeholder that must not drive routing decisions (no-heuristics mandate #28).
Fields§
§partition_key_count: usizeNumber of partition-key components (a single-component pk is 1).
clustering_key_count: usizeNumber of clustering-key columns.
non_key_column_names: HashSet<String>The real names of the non-key (regular + static) columns.
single_pk_component: Option<PartitionKeyComponent>For a single-component pk ONLY: the sole partition-key column’s authoritative
CQL type (from the SerializationHeader keyType) and its header-carried name.
The CQL type is authoritative — Cassandra serialises partition-key TYPES even
though it never serialises their NAMES (issue #1750, roborev 3784). It drives
the TYPED single-component key encoding so a schema-less WHERE int_pk = 42
builds the 4-byte int key Cassandra wrote, not an 8-byte BigInt key. The
name is the header’s synthesised placeholder (id for uuid/timeuuid, else
partition_key) — NOT a trusted identity, only the label under which
build_row_from_scan reconstructs the pk column so the seeked row can be
re-validated against the predicate. None for a composite pk (the typed
single-component fast path does not apply) or when no reader exposed a
single-component pk type.
Trait Implementations§
Source§impl Clone for PartitionKeyShape
impl Clone for PartitionKeyShape
Source§fn clone(&self) -> PartitionKeyShape
fn clone(&self) -> PartitionKeyShape
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 PartitionKeyShape
impl Debug for PartitionKeyShape
impl Eq for PartitionKeyShape
Source§impl PartialEq for PartitionKeyShape
impl PartialEq for PartitionKeyShape
impl StructuralPartialEq for PartitionKeyShape
Auto Trait Implementations§
impl Freeze for PartitionKeyShape
impl RefUnwindSafe for PartitionKeyShape
impl Send for PartitionKeyShape
impl Sync for PartitionKeyShape
impl Unpin for PartitionKeyShape
impl UnsafeUnpin for PartitionKeyShape
impl UnwindSafe for PartitionKeyShape
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,
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.