Trait lance_arrow::floats::ArrowFloatType

source ·
pub trait ArrowFloatType: Debug {
    type Native: FromPrimitive + FloatToArrayType<ArrowType = Self> + AsPrimitive<f32> + Debug + Display;
    type ArrayType: FloatArray<Self>;

    const FLOAT_TYPE: FloatType;
    const MIN: Self::Native;
    const MAX: Self::Native;

    // Provided method
    fn empty_array() -> Self::ArrayType { ... }
}
Expand description

Trait for float types used in Arrow Array.

Required Associated Types§

source

type Native: FromPrimitive + FloatToArrayType<ArrowType = Self> + AsPrimitive<f32> + Debug + Display

source

type ArrayType: FloatArray<Self>

Arrow Float Array Type.

Required Associated Constants§

Provided Methods§

source

fn empty_array() -> Self::ArrayType

Returns empty array of this type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ArrowFloatType for Float16Type

§

type Native = f16

source§

const FLOAT_TYPE: FloatType = FloatType::Float16

source§

const MIN: Self::Native = {transmute(0xfbff): <arrow_array::types::Float16Type as floats::ArrowFloatType>::Native}

source§

const MAX: Self::Native = {transmute(0x7bff): <arrow_array::types::Float16Type as floats::ArrowFloatType>::Native}

§

type ArrayType = PrimitiveArray<Float16Type>

source§

impl ArrowFloatType for Float32Type

§

type Native = f32

source§

const FLOAT_TYPE: FloatType = FloatType::Float32

source§

const MIN: Self::Native = {transmute(0xff7fffff): <arrow_array::types::Float32Type as floats::ArrowFloatType>::Native}

source§

const MAX: Self::Native = {transmute(0x7f7fffff): <arrow_array::types::Float32Type as floats::ArrowFloatType>::Native}

§

type ArrayType = PrimitiveArray<Float32Type>

source§

impl ArrowFloatType for Float64Type

§

type Native = f64

source§

const FLOAT_TYPE: FloatType = FloatType::Float64

source§

const MIN: Self::Native = {transmute(0xffefffffffffffff): <arrow_array::types::Float64Type as floats::ArrowFloatType>::Native}

source§

const MAX: Self::Native = {transmute(0x7fefffffffffffff): <arrow_array::types::Float64Type as floats::ArrowFloatType>::Native}

§

type ArrayType = PrimitiveArray<Float64Type>

Implementors§

source§

impl ArrowFloatType for BFloat16Type

§

type Native = bf16

source§

const FLOAT_TYPE: FloatType = FloatType::BFloat16

source§

const MIN: Self::Native = {transmute(0xff7f): <bfloat16::BFloat16Type as floats::ArrowFloatType>::Native}

source§

const MAX: Self::Native = {transmute(0x7f7f): <bfloat16::BFloat16Type as floats::ArrowFloatType>::Native}

§

type ArrayType = BFloat16Array