Module datatypes

Source
Expand description

Defines the logical data types of Arrow arrays.

The most important things you might be looking for are:

  • Schema to describe a schema.
  • Field to describe one field within a schema.
  • DataType to describe the type of a field.

Structs§

BinaryViewType
BinaryViewType for string arrays
BooleanType
A boolean datatype
Date32Type
32-bit date type: the elapsed time since UNIX epoch in days (32 bits).
Date64Type
64-bit date type: the elapsed time since UNIX epoch in milliseconds (64 bits). Values must be divisible by 86_400_000. See DataType::Date64 for more details.
Decimal128Type
The decimal type for a Decimal128Array
Decimal256Type
The decimal type for a Decimal256Array
DurationMicrosecondType
Elapsed time type: microseconds.
DurationMillisecondType
Elapsed time type: milliseconds.
DurationNanosecondType
Elapsed time type: nanoseconds.
DurationSecondType
Elapsed time type: seconds.
Field
Describes a single column in a Schema.
Fields
A cheaply cloneable, owned slice of FieldRef
Float16Type
16-bit floating point number type.
Float32Type
32-bit floating point number type.
Float64Type
64-bit floating point number type.
GenericBinaryType
ByteArrayType for binary arrays
GenericStringType
ByteArrayType for string arrays
Int8Type
A signed 8-bit integer type.
Int16Type
Signed 16-bit integer type.
Int32Type
Signed 32-bit integer type.
Int64Type
Signed 64-bit integer type.
IntervalDayTime
Value of an IntervalDayTime array
IntervalDayTimeType
“Calendar” interval type: days and milliseconds. See IntervalDayTime for more details.
IntervalMonthDayNano
Value of an IntervalMonthDayNano array
IntervalMonthDayNanoType
“Calendar” interval type: months, days, and nanoseconds. See IntervalMonthDayNano for more details.
IntervalYearMonthType
32-bit “calendar” interval type: the number of whole months.
Schema
Describes the meta-data of an ordered sequence of relative types.
SchemaBuilder
A builder to facilitate building a Schema from iteratively from FieldRef
StringViewType
ByteViewType for string arrays
Time32MillisecondType
32-bit time type: the elapsed time since midnight in milliseconds.
Time32SecondType
32-bit time type: the elapsed time since midnight in seconds.
Time64MicrosecondType
64-bit time type: the elapsed time since midnight in microseconds.
Time64NanosecondType
64-bit time type: the elapsed time since midnight in nanoseconds.
TimestampMicrosecondType
Timestamp microsecond type with an optional timezone.
TimestampMillisecondType
Timestamp millisecond type with an optional timezone.
TimestampNanosecondType
Timestamp nanosecond type with an optional timezone.
TimestampSecondType
Timestamp second type with an optional timezone.
UInt8Type
Unsigned 8-bit integer type.
UInt16Type
Unsigned 16-bit integer type.
UInt32Type
Unsigned 32-bit integer type.
UInt64Type
Unsigned 64-bit integer type.
UnionFields
A cheaply cloneable, owned collection of FieldRef and their corresponding type ids
i256
A signed 256-bit integer

Enums§

DataType
Datatypes supported by this implementation of Apache Arrow.
IntervalUnit
YEAR_MONTH, DAY_TIME, MONTH_DAY_NANO interval in SQL style.
TimeUnit
An absolute length of time in seconds, milliseconds, microseconds or nanoseconds.
UnionMode
Sparse or Dense union layouts

Constants§

DECIMAL128_MAX_PRECISION
The maximum precision for DataType::Decimal128 values
DECIMAL128_MAX_SCALE
The maximum scale for DataType::Decimal128 values
DECIMAL256_MAX_PRECISION
The maximum precision for DataType::Decimal256 values
DECIMAL256_MAX_SCALE
The maximum scale for DataType::Decimal256 values
DECIMAL_DEFAULT_SCALE
The default scale for DataType::Decimal128 and DataType::Decimal256 values
MAX_DECIMAL128_FOR_EACH_PRECISION
MAX_DECIMAL128_FOR_EACH_PRECISION[p] holds the maximum i128 value that can be stored in Decimal128 value of precision p.
MAX_DECIMAL256_FOR_EACH_PRECISION
MAX_DECIMAL256_FOR_EACH_PRECISION[p] holds the maximum i256 value that can be stored in a Decimal256 value of precision p.
MAX_DECIMAL_FOR_EACH_PRECISIONDeprecated
MAX_DECIMAL_FOR_EACH_PRECISION[p-1] holds the maximum i128 value that can be stored in a Decimal128 value of precision p
MIN_DECIMAL128_FOR_EACH_PRECISION
MIN_DECIMAL_FOR_EACH_PRECISION[p] holds the minimum i128 value that can be stored in a Decimal128 value of precision p.
MIN_DECIMAL256_FOR_EACH_PRECISION
MIN_DECIMAL256_FOR_EACH_PRECISION[p] holds the minimum i256 value that can be stored in a Decimal256 value of precision p.
MIN_DECIMAL_FOR_EACH_PRECISIONDeprecated
MIN_DECIMAL_FOR_EACH_PRECISION[p-1] holds the minimum i128 value that can be stored in a Decimal128 value of precision p

Traits§

ArrowDictionaryKeyType
A subtype of primitive type that represents legal dictionary keys. See https://arrow.apache.org/docs/format/Columnar.html
ArrowNativeType
Trait expressing a Rust type that has the same in-memory representation as Arrow.
ArrowNativeTypeOp
Trait for ArrowNativeType that adds checked and unchecked arithmetic operations, and totally ordered comparison operations
ArrowNumericType
A subtype of primitive type that represents numeric values.
ArrowPrimitiveType
Trait for primitive values.
ArrowTemporalType
A subtype of primitive type that represents temporal values.
ArrowTimestampType
A timestamp type allows us to create array builders that take a timestamp.
ByteArrayType
A trait over the variable-size byte array types
ByteViewType
A trait over the variable length bytes view array types
DecimalType
A trait over the decimal types, used by PrimitiveArray to provide a generic implementation across the various decimal types
RunEndIndexType
A subtype of primitive type that is used as run-ends index in RunArray. See https://arrow.apache.org/docs/format/Columnar.html
ToByteSlice
Allows conversion from supported Arrow types to a byte slice.

Functions§

is_validate_decimal256_precision
Return true if the specified i256 value can be properly interpreted as a Decimal256 number with precision precision
is_validate_decimal_precision
Returns true if the specified i128 value can be properly interpreted as a Decimal128 number with precision precision
validate_decimal256_precision
Validates that the specified i256 of value can be properly interpreted as a Decimal256 number with precision precision
validate_decimal_precision
Validates that the specified i128 value can be properly interpreted as a Decimal128 number with precision precision
validate_decimal_precision_and_scale
Validate that precision and scale are valid for T

Type Aliases§

BinaryType
An arrow binary array with i32 offsets
FieldRef
A reference counted Field
LargeBinaryType
An arrow binary array with i64 offsets
LargeUtf8Type
An arrow utf8 array with i64 offsets
SchemaRef
A reference-counted reference to a Schema.
Utf8Type
An arrow utf8 array with i32 offsets