Struct mz_persist_types::part::DynColumnRef
source · pub struct DynColumnRef(DataType, Arc<dyn Any + Send + Sync>);
Expand description
A type-erased crate::columnar::Data::Col.
Tuple Fields§
§0: DataType
§1: Arc<dyn Any + Send + Sync>
Implementations§
source§impl DynColumnRef
impl DynColumnRef
fn new<T: Data>(col: T::Col) -> Self
sourcepub fn downcast<T: Data>(&self) -> Result<&T::Col, String>
pub fn downcast<T: Data>(&self) -> Result<&T::Col, String>
Returns a typed, shared reference to the inner value if it is a column
of type T
, or an Err if it isn’t.
sourcepub fn stats_default(&self) -> Box<dyn DynStats>
pub fn stats_default(&self) -> Box<dyn DynStats>
Computes statistics on this column using the default implementation of
T::Stats::From
.
See Self::stats.
sourcepub fn stats<T: Data, F: FnOnce(&T::Col) -> T::Stats>(
&self,
stats_fn: F
) -> Result<T::Stats, String>
pub fn stats<T: Data, F: FnOnce(&T::Col) -> T::Stats>( &self, stats_fn: F ) -> Result<T::Stats, String>
Computes statistics on this column using the specified function.
See Self::stats_default.
pub(crate) fn from_arrow( data_type: &DataType, array: &Box<dyn Array> ) -> Result<Self, String>
pub(crate) fn to_arrow(&self) -> (Encoding, Box<dyn Array>)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DynColumnRef
impl Send for DynColumnRef
impl Sync for DynColumnRef
impl Unpin for DynColumnRef
impl !UnwindSafe for DynColumnRef
Blanket Implementations§
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>
Wrap the input message
T
in a tonic::Request
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>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.