[][src]Enum arrow::datatypes::DataType

pub enum DataType {
    Null,
    Boolean,
    Int8,
    Int16,
    Int32,
    Int64,
    UInt8,
    UInt16,
    UInt32,
    UInt64,
    Float16,
    Float32,
    Float64,
    Timestamp(TimeUnitOption<Arc<String>>),
    Date32(DateUnit),
    Date64(DateUnit),
    Time32(TimeUnit),
    Time64(TimeUnit),
    Duration(TimeUnit),
    Interval(IntervalUnit),
    Binary,
    FixedSizeBinary(i32),
    LargeBinary,
    Utf8,
    LargeUtf8,
    List(Box<DataType>),
    FixedSizeList(Box<DataType>, i32),
    LargeList(Box<DataType>),
    Struct(Vec<Field>),
    Union(Vec<Field>),
    Dictionary(Box<DataType>, Box<DataType>),
}

The set of datatypes that are supported by this implementation of Apache Arrow.

The Arrow specification on data types includes some more types. See also Schema.fbs for Arrow's specification.

The variants of this enum include primitive fixed size types as well as parametric or nested types. Currently the Rust implementation supports the following nested types:

  • List<T>
  • Struct<T, U, V, ...>

Nested types can themselves be nested within other arrays. For more information on these types please see the physical memory layout of Apache Arrow.

Variants

Null

Null type

Boolean

A boolean datatype representing the values true and false.

Int8

A signed 8-bit integer.

Int16

A signed 16-bit integer.

Int32

A signed 32-bit integer.

Int64

A signed 64-bit integer.

UInt8

An unsigned 8-bit integer.

UInt16

An unsigned 16-bit integer.

UInt32

An unsigned 32-bit integer.

UInt64

An unsigned 64-bit integer.

Float16

A 16-bit floating point number.

Float32

A 32-bit floating point number.

Float64

A 64-bit floating point number.

Timestamp(TimeUnitOption<Arc<String>>)

A timestamp with an optional timezone.

Time is measured as a Unix epoch, counting the seconds from 00:00:00.000 on 1 January 1970, excluding leap seconds, as a 64-bit integer.

The time zone is a string indicating the name of a time zone, one of:

  • As used in the Olson time zone database (the "tz database" or "tzdata"), such as "America/New_York"
  • An absolute time zone offset of the form +XX:XX or -XX:XX, such as +07:30
Date32(DateUnit)

A 32-bit date representing the elapsed time since UNIX epoch (1970-01-01) in days (32 bits).

Date64(DateUnit)

A 64-bit date representing the elapsed time since UNIX epoch (1970-01-01) in milliseconds (64 bits).

Time32(TimeUnit)

A 32-bit time representing the elapsed time since midnight in the unit of TimeUnit.

Time64(TimeUnit)

A 64-bit time representing the elapsed time since midnight in the unit of TimeUnit.

Duration(TimeUnit)

Measure of elapsed time in either seconds, milliseconds, microseconds or nanoseconds.

Interval(IntervalUnit)

A "calendar" interval which models types that don't necessarily have a precise duration without the context of a base timestamp (e.g. days can differ in length during day light savings time transitions).

Binary

Opaque binary data of variable length.

FixedSizeBinary(i32)

Opaque binary data of fixed size. Enum parameter specifies the number of bytes per value.

LargeBinary

Opaque binary data of variable length and 64-bit offsets.

Utf8

A variable-length string in Unicode with UTF-8 encoding.

LargeUtf8

A variable-length string in Unicode with UFT-8 encoding and 64-bit offsets.

List(Box<DataType>)

A list of some logical data type with variable length.

FixedSizeList(Box<DataType>, i32)

A list of some logical data type with fixed length.

LargeList(Box<DataType>)

A list of some logical data type with variable length and 64-bit offsets.

Struct(Vec<Field>)

A nested datatype that contains a number of sub-fields.

Union(Vec<Field>)

A nested datatype that can represent slots of differing types.

Dictionary(Box<DataType>, Box<DataType>)

A dictionary encoded array (key_type, value_type), where each array element is an index of key_type into an associated dictionary of value_type.

Dictionary arrays are used to store columns of value_type that contain many repeated values using less memory, but with a higher CPU overhead for some operations.

This type mostly used to represent low cardinality string arrays or a limited set of primitive types as integers.

Implementations

impl DataType[src]

pub fn to_json(&self) -> Value[src]

Generate a JSON representation of the data type

Trait Implementations

impl Clone for DataType[src]

impl Debug for DataType[src]

impl<'de> Deserialize<'de> for DataType[src]

impl Eq for DataType[src]

impl Hash for DataType[src]

impl Ord for DataType[src]

impl PartialEq<DataType> for DataType[src]

impl PartialOrd<DataType> for DataType[src]

impl Serialize for DataType[src]

impl StructuralEq for DataType[src]

impl StructuralPartialEq for DataType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,