Enum polars::datatypes::ArrowDataType[]

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

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

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

Date64

A 64-bit date representing the elapsed time since UNIX epoch (1970-01-01) in milliseconds (64 bits). Values are evenly divisible by 86400000.

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<Field, Global>)

A list of some logical data type with variable length.

FixedSizeList(Box<Field, Global>, i32)

A list of some logical data type with fixed length.

LargeList(Box<Field, Global>)

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

Struct(Vec<Field, Global>)

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

Union(Vec<Field, Global>)

A nested datatype that can represent slots of differing types.

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

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.

Decimal(usizeusize)

Decimal value with precision and scale

Implementations

impl DataType

pub fn to_json(&self) -> Value

Generate a JSON representation of the data type.

pub fn is_numeric(t: &DataType) -> bool

Returns true if this type is numeric: (UInt*, Unit*, or Float*).

Trait Implementations

impl Clone for DataType

pub fn clone(&self) -> DataType

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for DataType

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for DataType

pub fn deserialize<__D>(
    __deserializer: __D
) -> Result<DataType, <__D as Deserializer<'de>>::Error> where
    __D: Deserializer<'de>, 

Deserialize this value from the given Serde deserializer. Read more

impl Display for DataType

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

impl<'_> From<&'_ DataType> for DataType[src]

pub fn from(dt: &DataType) -> DataType[src]

Performs the conversion.

impl Hash for DataType

pub fn hash<__H>(&self, state: &mut __H) where
    __H: Hasher

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl Ord for DataType

pub fn cmp(&self, other: &DataType) -> Ordering

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl PartialEq<DataType> for DataType[src]

pub fn eq(&self, other: &DataType) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<DataType> for DataType

pub fn eq(&self, other: &DataType) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

pub fn ne(&self, other: &DataType) -> bool

This method tests for !=.

impl PartialOrd<DataType> for DataType

pub fn partial_cmp(&self, other: &DataType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Serialize for DataType

pub fn serialize<__S>(
    &self,
    __serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
    __S: Serializer

Serialize this value into the given Serde serializer. Read more

impl Eq for DataType

impl StructuralEq for DataType

impl StructuralPartialEq for DataType

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> CallHasher for T where
    T: Hash + ?Sized

pub default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64 where
    B: BuildHasher,
    H: Hash + ?Sized

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

pub fn cast(self) -> U

Numeric cast from self to T.

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

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> FromCast<T> for T

pub fn from_cast(t: T) -> T

Numeric cast from T to Self.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> ToCell for T where
    T: ToString

pub fn to_cell(self) -> Cell

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V

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