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 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

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().

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

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Duration(TimeUnit::Microsecond)

source§

impl ArrowPrimitiveType for DurationMillisecondType

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Duration(TimeUnit::Millisecond)

source§

impl ArrowPrimitiveType for DurationNanosecondType

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Duration(TimeUnit::Nanosecond)

source§

impl ArrowPrimitiveType for DurationSecondType

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Duration(TimeUnit::Second)

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

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Interval(IntervalUnit::DayTime)

source§

impl ArrowPrimitiveType for IntervalMonthDayNanoType

§

type Native = i128

source§

const DATA_TYPE: DataType = DataType::Interval(IntervalUnit::MonthDayNano)

source§

impl ArrowPrimitiveType for IntervalYearMonthType

§

type Native = i32

source§

const DATA_TYPE: DataType = DataType::Interval(IntervalUnit::YearMonth)

source§

impl ArrowPrimitiveType for Time32MillisecondType

§

type Native = i32

source§

const DATA_TYPE: DataType = DataType::Time32(TimeUnit::Millisecond)

source§

impl ArrowPrimitiveType for Time32SecondType

§

type Native = i32

source§

const DATA_TYPE: DataType = DataType::Time32(TimeUnit::Second)

source§

impl ArrowPrimitiveType for Time64MicrosecondType

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Time64(TimeUnit::Microsecond)

source§

impl ArrowPrimitiveType for Time64NanosecondType

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Time64(TimeUnit::Nanosecond)

source§

impl ArrowPrimitiveType for TimestampMicrosecondType

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Timestamp(TimeUnit::Microsecond, None)

source§

impl ArrowPrimitiveType for TimestampMillisecondType

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Timestamp(TimeUnit::Millisecond, None)

source§

impl ArrowPrimitiveType for TimestampNanosecondType

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Timestamp(TimeUnit::Nanosecond, None)

source§

impl ArrowPrimitiveType for TimestampSecondType

§

type Native = i64

source§

const DATA_TYPE: DataType = DataType::Timestamp(TimeUnit::Second, None)

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