Enum polars::prelude::datatypes::ArrowDataType [−]
pub enum ArrowDataType {}Show variants
Null, Boolean, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float16, Float32, Float64, Timestamp(TimeUnit, Option<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(usize, usize),
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 type
A boolean datatype representing the values true
and false
.
A signed 8-bit integer.
A signed 16-bit integer.
A signed 32-bit integer.
A signed 64-bit integer.
An unsigned 8-bit integer.
An unsigned 16-bit integer.
An unsigned 32-bit integer.
An unsigned 64-bit integer.
A 16-bit floating point number.
A 32-bit floating point number.
A 64-bit floating point number.
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
A 32-bit date representing the elapsed time since UNIX epoch (1970-01-01) in days (32 bits).
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).
Opaque binary data of variable length.
FixedSizeBinary(i32)
Opaque binary data of fixed size. Enum parameter specifies the number of bytes per value.
Opaque binary data of variable length and 64-bit offsets.
A variable-length string in Unicode with UTF-8 encoding.
A variable-length string in Unicode with UFT-8 encoding and 64-bit offsets.
A list of some logical data type with variable length.
A list of some logical data type with fixed length.
A list of some logical data type with variable length and 64-bit offsets.
A nested datatype that contains a number of sub-fields.
A nested datatype that can represent slots of differing types.
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 value with precision and scale
Implementations
impl DataType
impl DataType
pub fn is_numeric(t: &DataType) -> bool
pub fn is_numeric(t: &DataType) -> bool
Returns true if this type is numeric: (UInt*, Unit*, or Float*).
Trait Implementations
impl<'de> Deserialize<'de> for DataType
impl<'de> Deserialize<'de> for DataType
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<DataType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
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 PartialOrd<DataType> for DataType
impl PartialOrd<DataType> for DataType
pub fn partial_cmp(&self, other: &DataType) -> Option<Ordering>
pub fn partial_cmp(&self, other: &DataType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
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 StructuralEq for DataType
impl StructuralPartialEq for DataType
Auto Trait Implementations
impl RefUnwindSafe for DataType
impl UnwindSafe for DataType
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V