Trait arrow_array::types::ArrowPrimitiveType

source ·
pub trait ArrowPrimitiveType: PrimitiveTypeSealed + 'static {
    type Native: ArrowNativeTypeOp;

    const DATA_TYPE: DataType;

    // Provided methods
    fn get_byte_width() -> usize { ... }
    fn default_value() -> Self::Native { ... }
}
Expand description

Trait for primitive values, bridging the dynamic-typed nature of Arrow (via DataType) with the static-typed nature of rust types (ArrowNativeType) for all types that implement ArrowNativeType.

Required Associated Types§

source

type Native: ArrowNativeTypeOp

Corresponding Rust native type for the primitive type.

Required Associated Constants§

source

const DATA_TYPE: DataType

the corresponding Arrow data type of this primitive type.

Provided Methods§

source

fn get_byte_width() -> usize

👎Deprecated: Use ArrowNativeType::get_byte_width

Returns the byte width of this primitive type.

source

fn default_value() -> Self::Native

Returns a default value of this primitive type.

This is useful for aggregate array ops like sum(), mean().

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ArrowPrimitiveType for Date32Type

§

type Native = i32

source§

const DATA_TYPE: DataType = DataType::Date32

source§

impl ArrowPrimitiveType for Date64Type

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Date64

source§

impl ArrowPrimitiveType for Decimal128Type

§

type Native = i128

source§

const DATA_TYPE: DataType = <Self as DecimalType>::DEFAULT_TYPE

source§

impl ArrowPrimitiveType for Decimal256Type

§

type Native = i256

source§

const DATA_TYPE: DataType = <Self as DecimalType>::DEFAULT_TYPE

source§

impl ArrowPrimitiveType for DurationMicrosecondType

source§

impl ArrowPrimitiveType for DurationMillisecondType

source§

impl ArrowPrimitiveType for DurationNanosecondType

source§

impl ArrowPrimitiveType for DurationSecondType

source§

impl ArrowPrimitiveType for Float16Type

§

type Native = f16

source§

const DATA_TYPE: DataType = DataType::Float16

source§

impl ArrowPrimitiveType for Float32Type

§

type Native = f32

source§

const DATA_TYPE: DataType = DataType::Float32

source§

impl ArrowPrimitiveType for Float64Type

§

type Native = f64

source§

const DATA_TYPE: DataType = DataType::Float64

source§

impl ArrowPrimitiveType for Int8Type

§

type Native = i8

source§

const DATA_TYPE: DataType = DataType::Int8

source§

impl ArrowPrimitiveType for Int16Type

§

type Native = i16

source§

const DATA_TYPE: DataType = DataType::Int16

source§

impl ArrowPrimitiveType for Int32Type

§

type Native = i32

source§

const DATA_TYPE: DataType = DataType::Int32

source§

impl ArrowPrimitiveType for Int64Type

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Int64

source§

impl ArrowPrimitiveType for IntervalDayTimeType

source§

impl ArrowPrimitiveType for IntervalMonthDayNanoType

source§

impl ArrowPrimitiveType for IntervalYearMonthType

source§

impl ArrowPrimitiveType for Time32MillisecondType

source§

impl ArrowPrimitiveType for Time32SecondType

source§

impl ArrowPrimitiveType for Time64MicrosecondType

source§

impl ArrowPrimitiveType for Time64NanosecondType

source§

impl ArrowPrimitiveType for TimestampMicrosecondType

source§

impl ArrowPrimitiveType for TimestampMillisecondType

source§

impl ArrowPrimitiveType for TimestampNanosecondType

source§

impl ArrowPrimitiveType for TimestampSecondType

source§

impl ArrowPrimitiveType for UInt8Type

§

type Native = u8

source§

const DATA_TYPE: DataType = DataType::UInt8

source§

impl ArrowPrimitiveType for UInt16Type

§

type Native = u16

source§

const DATA_TYPE: DataType = DataType::UInt16

source§

impl ArrowPrimitiveType for UInt32Type

§

type Native = u32

source§

const DATA_TYPE: DataType = DataType::UInt32

source§

impl ArrowPrimitiveType for UInt64Type

§

type Native = u64

source§

const DATA_TYPE: DataType = DataType::UInt64