pub struct TableCounts {
pub partition_count: u64,
pub total_rows: Option<u64>,
}Expand description
Authoritative per-SSTable row/partition counts decoded from the STATS
component of Statistics.db (issue #944).
Both fields come straight from cassandra-5.0.0
StatsMetadata.StatsMetadataSerializer.serialize — no heuristics (#28):
partition_countis the sum of the bucket counts of theestimatedPartitionSizeEstimatedHistogram(the FIRST STATS field). That histogram records one observation per partition, so Σ counts is exactly the SSTable’s partition count — the same valueSSTableReaderexposes viagetEstimatedPartitionSize().count(). It is reachable by a fully self-describing walk and needs NO version gates.total_rowsis thetotalRowslongwritten near the end of the STATS body (field 12). Reaching it requires the version-gated forward walk (improvedMinMax/legacyMinMaxblock + commit-log intervals), so it isSomeonly when authoritativeVersionGatesare supplied AND the walk could traverse the min/max block. For a clustered table whose covered-Slice bound values are not modeled,total_rowsis honestlyNonerather than a guessed value.
Fields§
§partition_count: u64Σ estimatedPartitionSize histogram bucket counts = partition count.
total_rows: Option<u64>totalRows from the STATS body, when the gated walk could reach it.
Trait Implementations§
Source§impl Clone for TableCounts
impl Clone for TableCounts
Source§fn clone(&self) -> TableCounts
fn clone(&self) -> TableCounts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TableCounts
Source§impl Debug for TableCounts
impl Debug for TableCounts
impl Eq for TableCounts
Source§impl PartialEq for TableCounts
impl PartialEq for TableCounts
impl StructuralPartialEq for TableCounts
Auto Trait Implementations§
impl Freeze for TableCounts
impl RefUnwindSafe for TableCounts
impl Send for TableCounts
impl Sync for TableCounts
impl Unpin for TableCounts
impl UnsafeUnpin for TableCounts
impl UnwindSafe for TableCounts
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.