Expand description
Contains the Array and MutableArray trait objects declaring arrays,
as well as concrete arrays (such as Utf8Array and MutableUtf8Array).
Fixed-length containers with optional values
that are laid in memory according to the Arrow specification.
Each array type has its own struct. The following are the main array types:
PrimitiveArrayandMutablePrimitiveArray, an array of values with a fixed length such as integers, floats, etc.BooleanArrayandMutableBooleanArray, an array of boolean values (stored as a bitmap)Utf8ArrayandMutableUtf8Array, an array of variable length utf8 valuesBinaryArrayandMutableBinaryArray, an array of opaque variable length valuesListArrayandMutableListArray, an array of arrays (e.g.[[1, 2], None, [], [None]])StructArrayand [MutableStructArray], an array of arrays identified by a string (e.g.{"a": [1, 2], "b": [true, false]})
All immutable arrays implement the trait object Array and that can be downcast
to a concrete struct based on PhysicalType available from Array::dtype.
All immutable arrays are backed by Buffer and thus cloning and slicing them is O(1).
Most arrays contain a MutableArray counterpart that is neither cloneable nor sliceable, but
can be operated in-place.
Re-exports§
pub use iterator::ArrayValuesIter;
Modules§
Structs§
- Binary
Array - A
BinaryArrayis Arrow’s semantically equivalent of an immutableVec<Option<Vec<u8>>>. It implementsArray. - Binary
Array Builder - Binary
View Array Generic - Binary
View Array Generic Builder - Boolean
Array - A
BooleanArrayis Arrow’s semantically equivalent of an immutableVec<Option<bool>>. It implementsArray. - Boolean
Array Builder - Dictionary
Array - An
Arraywhose values are stored as indices. ThisArrayis useful when the cardinality of values is low compared to the length of theArray. - Fixed
Size Binary Array - The Arrow’s equivalent to an immutable
Vec<Option<[u8; size]>>. Cloning and slicing this struct isO(1). - Fixed
Size Binary Array Builder - Fixed
Size List Array - The Arrow’s equivalent to an immutable
Vec<Option<[T; size]>>whereTis an Arrow type. Cloning and slicing this struct isO(1). - Fixed
Size List Array Builder - List
Array - An
Arraysemantically equivalent toVec<Option<Vec<Option<T>>>>with Arrow’s in-memory. - List
Array Builder - MapArray
- An array representing a (key, value), both of arbitrary logical types.
- Mutable
Binary Array - The Arrow’s equivalent to
Vec<Option<Vec<u8>>>. Converting aMutableBinaryArrayinto aBinaryArrayisO(1). - Mutable
Binary Values Array - A
MutableArraythat builds aBinaryArray. It differs fromMutableBinaryArrayin that it builds non-nullBinaryArray. - Mutable
Binary View Array - Mutable
Boolean Array - The Arrow’s equivalent to
Vec<Option<bool>>, but with1/16of its size. Converting aMutableBooleanArrayinto aBooleanArrayisO(1). - Mutable
Dictionary Array - Mutable
Fixed Size Binary Array - The Arrow’s equivalent to a mutable
Vec<Option<[u8; size]>>. Converting aMutableFixedSizeBinaryArrayinto aFixedSizeBinaryArrayisO(1). - Mutable
Fixed Size List Array - The mutable version of
FixedSizeListArray. - Mutable
List Array - The mutable version of
ListArray. - Mutable
Null Array - A distinct type to disambiguate clashing methods
- Mutable
Primitive Array - The Arrow’s equivalent to
Vec<Option<T>>whereTis byte-size (e.g.i32). Converting aMutablePrimitiveArrayinto aPrimitiveArrayisO(1). - Mutable
Utf8 Array - A
MutableArraythat builds aUtf8Array. It differs fromMutableUtf8ValuesArrayin that it can build nullableUtf8Arrays. - Mutable
Utf8 Values Array - A
MutableArraythat builds aUtf8Array. It differs fromMutableUtf8Arrayin that it builds non-nullUtf8Array. - Null
Array - The concrete
ArrayofArrowDataType::Null. - Null
Array Builder - Primitive
Array - A
PrimitiveArrayis Arrow’s semantically equivalent of an immutableVec<Option<T>>where T isNativeType(e.g.i32). It implementsArray. - Primitive
Array Builder - Struct
Array - A
StructArrayis a nestedArraywith an optional validity representing multipleArraywith the same number of rows. - Struct
Array Builder - Union
Array UnionArrayrepresents an array whose each slot can contain different values.- Utf8
Array - A
Utf8Arrayis arrow’s semantic equivalent of an immutableVec<Option<String>>. Cloning and slicing this struct isO(1). - View
- A reference to a set of bytes.
Traits§
- Array
- A trait representing an immutable Arrow array. Arrow arrays are trait objects
that are infallibly downcast to concrete types according to the
Array::dtype. - Array
Collect Iter Ext - Array
From Iter - Array
From Iter Dtype - Dictionary
Key - Trait denoting
NativeTypes that can be used as keys of a dictionary. - Generic
Binary Array - Trait that
BinaryArrayandUtf8Arrayimplement for the purposes of DRY. - Into
Boxed Array - Mutable
Array - A trait describing a mutable array; i.e. an array whose values can be changed.
- Parameter
Free Dtype Static Array - Push
Unchecked - A trait describing the ability of a struct to receive new items.
- Splitable
- Static
Array - TryExtend
- A trait describing the ability of a struct to create itself from a iterator.
This is similar to
Extend, but accepted the creation to error. - TryExtend
From Self - A trait describing the ability of a struct to extend from a reference of itself.
Specialization of
TryExtend. - TryPush
- A trait describing the ability of a struct to receive new items.
- Value
Size - View
Type
Functions§
- clone
- Clones a dynamic
Array. - equal
- Logically compares two
Arrays. Two arrays are logically equal if and only if: - get_
display - Returns a function that writes the element of
arrayat positionindexto aWrite, writingnullto the null slots. - get_
value_ display - Returns a function that writes the value of the element of
arrayat positionindexto aWrite, writingnullin the null slots. - new_
empty_ array - Creates a new
Arraywith aArray::lenof 0. - new_
null_ array - Creates a new
ArrayofArrowDataTypedtypeandlength.
Type Aliases§
- Array
Ref - Binary
Value Iter - Iterator of values of an
BinaryArray. - Binary
View Array - Days
MsArray - A type definition
PrimitiveArrayfordays_ms - Days
MsVec - A type definition
MutablePrimitiveArrayfordays_ms - Float16
Array - A type definition
PrimitiveArrayforf16 - Float16
Vec - A type definition
MutablePrimitiveArrayforf16 - Float32
Array - A type definition
PrimitiveArrayforf32 - Float32
Vec - A type definition
MutablePrimitiveArrayforf32 - Float64
Array - A type definition
PrimitiveArrayforf64 - Float64
Vec - A type definition
MutablePrimitiveArrayforf64 - Int8
Array - A type definition
PrimitiveArrayfori8 - Int8Vec
- A type definition
MutablePrimitiveArrayfori8 - Int16
Array - A type definition
PrimitiveArrayfori16 - Int16
Vec - A type definition
MutablePrimitiveArrayfori16 - Int32
Array - A type definition
PrimitiveArrayfori32 - Int32
Vec - A type definition
MutablePrimitiveArrayfori32 - Int64
Array - A type definition
PrimitiveArrayfori64 - Int64
Vec - A type definition
MutablePrimitiveArrayfori64 - Int128
Array - A type definition
PrimitiveArrayfori128 - Int128
Vec - A type definition
MutablePrimitiveArrayfori128 - Int256
Array - A type definition
PrimitiveArrayfori256 - Int256
Vec - A type definition
MutablePrimitiveArrayfori256 - List
Values Iter - Iterator of values of a
ListArray. - Months
Days NsArray - A type definition
PrimitiveArrayformonths_days_ns - Months
Days NsVec - A type definition
MutablePrimitiveArrayformonths_days_ns - Mutable
PlBinary - Mutable
PlString - UInt8
Array - A type definition
PrimitiveArrayforu8 - UInt8
Vec - A type definition
MutablePrimitiveArrayforu8 - UInt16
Array - A type definition
PrimitiveArrayforu16 - UInt16
Vec - A type definition
MutablePrimitiveArrayforu16 - UInt32
Array - A type definition
PrimitiveArrayforu32 - UInt32
Vec - A type definition
MutablePrimitiveArrayforu32 - UInt64
Array - A type definition
PrimitiveArrayforu64 - UInt64
Vec - A type definition
MutablePrimitiveArrayforu64 - Utf8
Values Iter - Iterator of values of an
Utf8Array. - Utf8
View Array