Struct mz_persist_types::stats::ColumnarStats
source · pub struct ColumnarStats {
pub nulls: Option<ColumnNullStats>,
pub values: ColumnStatKinds,
}
Expand description
Statistics for a single column of data.
Fields§
§nulls: Option<ColumnNullStats>
Expected to be None
if the associated column is non-nullable.
values: ColumnStatKinds
Statistics on the values of the column.
Implementations§
source§impl ColumnarStats
impl ColumnarStats
sourcepub fn one_column_struct(len: usize, col: ColumnStatKinds) -> StructStats
pub fn one_column_struct(len: usize, col: ColumnStatKinds) -> StructStats
Returns a [StructStats]
with a single non-nullable column.
sourcepub fn as_non_null_values(&self) -> Option<&ColumnStatKinds>
pub fn as_non_null_values(&self) -> Option<&ColumnStatKinds>
Returns the inner ColumnStatKinds
if nulls
is None
.
sourcepub fn into_non_null_values(self) -> Option<ColumnStatKinds>
pub fn into_non_null_values(self) -> Option<ColumnStatKinds>
Returns the inner ColumnStatKinds
if nulls
is None
.
sourcepub fn into_struct_stats(self) -> Option<StructStats>
pub fn into_struct_stats(self) -> Option<StructStats>
Returns the inner StructStats
if nulls
is None
and values
is ColumnStatKinds::Struct
.
sourcefn try_as_stats<'a, T, F>(&'a self, map: F) -> Result<T, Error>
fn try_as_stats<'a, T, F>(&'a self, map: F) -> Result<T, Error>
Helper method to “downcast” to stats of type T
.
sourcefn try_as_option_stats<'a, T, F>(
&'a self,
map: F,
) -> Result<OptionStats<T>, Error>
fn try_as_option_stats<'a, T, F>( &'a self, map: F, ) -> Result<OptionStats<T>, Error>
Helper method to “downcast” OptionStats<T>
.
sourcepub fn try_as_optional_struct(&self) -> Result<OptionStats<&StructStats>, Error>
pub fn try_as_optional_struct(&self) -> Result<OptionStats<&StructStats>, Error>
Tries to “downcast” this instance of ColumnarStats
to an OptionStats<StructStats>
if the inner statistics are nullable and for a structured column.
sourcepub fn try_as_optional_bytes(&self) -> Result<OptionStats<&BytesStats>, Error>
pub fn try_as_optional_bytes(&self) -> Result<OptionStats<&BytesStats>, Error>
Tries to “downcast” this instance of ColumnarStats
to an OptionStats<BytesStats>
if the inner statistics are nullable and for a column of bytes.
sourcepub fn try_as_string(&self) -> Result<&PrimitiveStats<String>, Error>
pub fn try_as_string(&self) -> Result<&PrimitiveStats<String>, Error>
Tries to “downcast” this instance of ColumnarStats
to a PrimitiveStats<String>
if the inner statistics are nullable and for a structured column.
Trait Implementations§
source§impl Clone for ColumnarStats
impl Clone for ColumnarStats
source§fn clone(&self) -> ColumnarStats
fn clone(&self) -> ColumnarStats
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ColumnarStats
impl Debug for ColumnarStats
source§impl DynStats for ColumnarStats
impl DynStats for ColumnarStats
source§fn debug_json(&self) -> Value
fn debug_json(&self) -> Value
INSPECT SHARD
and debugging.source§fn into_columnar_stats(self) -> ColumnarStats
fn into_columnar_stats(self) -> ColumnarStats
self
as ColumnarStats
.source§impl RustType<ProtoDynStats> for ColumnarStats
impl RustType<ProtoDynStats> for ColumnarStats
source§fn into_proto(&self) -> ProtoDynStats
fn into_proto(&self) -> ProtoDynStats
Self
into a Proto
value.source§fn from_proto(proto: ProtoDynStats) -> Result<Self, TryFromProtoError>
fn from_proto(proto: ProtoDynStats) -> Result<Self, TryFromProtoError>
source§fn into_proto_owned(self) -> Proto
fn into_proto_owned(self) -> Proto
Self::into_proto
that types can
optionally implement, otherwise, the default implementation
delegates to Self::into_proto
.Auto Trait Implementations§
impl Freeze for ColumnarStats
impl RefUnwindSafe for ColumnarStats
impl Send for ColumnarStats
impl Sync for ColumnarStats
impl Unpin for ColumnarStats
impl UnwindSafe for ColumnarStats
Blanket Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.