Trait polars::chunked_array::object::datatypes::ArrowPrimitiveType [−]
pub trait ArrowPrimitiveType: 'static { type Native: ArrowNativeType; const DATA_TYPE: DataType; fn get_byte_width() -> usize { ... } fn default_value() -> Self::Native { ... } }
Expand description
Trait bridging the dynamic-typed nature of Arrow (via DataType
) with the
static-typed nature of rust types ([ArrowNativeType
]) for all types that implement [ArrowNativeType
].
Associated Types
type Native: ArrowNativeType
type Native: ArrowNativeType
Corresponding Rust native type for the primitive type.
Associated Constants
Provided methods
fn get_byte_width() -> usize
fn get_byte_width() -> usize
Returns the byte width of this primitive type.
fn default_value() -> Self::Native
fn default_value() -> Self::Native
Returns a default value of this primitive type.
This is useful for aggregate array ops like sum()
, mean()
.
Implementors
impl ArrowPrimitiveType for Date32Type
impl ArrowPrimitiveType for Date64Type
impl ArrowPrimitiveType for DurationNanosecondType
impl ArrowPrimitiveType for DurationSecondType
impl ArrowPrimitiveType for Float32Type
impl ArrowPrimitiveType for Float64Type
impl ArrowPrimitiveType for Int8Type
impl ArrowPrimitiveType for Int16Type
impl ArrowPrimitiveType for Int32Type
impl ArrowPrimitiveType for Int64Type
impl ArrowPrimitiveType for IntervalDayTimeType
impl ArrowPrimitiveType for IntervalYearMonthType
impl ArrowPrimitiveType for Time32MillisecondType
impl ArrowPrimitiveType for Time32SecondType
impl ArrowPrimitiveType for Time64MicrosecondType
impl ArrowPrimitiveType for Time64NanosecondType
impl ArrowPrimitiveType for TimestampSecondType
impl ArrowPrimitiveType for UInt8Type
impl ArrowPrimitiveType for UInt16Type
impl ArrowPrimitiveType for UInt32Type
impl ArrowPrimitiveType for UInt64Type