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:
PrimitiveArray
andMutablePrimitiveArray
, an array of values with a fixed length such as integers, floats, etc.BooleanArray
andMutableBooleanArray
, an array of boolean values (stored as a bitmap)Utf8Array
andMutableUtf8Array
, an array of variable length utf8 valuesBinaryArray
andMutableBinaryArray
, an array of opaque variable length valuesListArray
andMutableListArray
, an array of arrays (e.g.[[1, 2], None, [], [None]]
)StructArray
and [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§
- growable
- Contains the trait
Growable
and corresponding concreate implementations, one per concrete array, that offer the ability to create a newArray
out of slices of existingArray
s. - iterator
- physical_
binary - specification
Structs§
- Binary
Array - A
BinaryArray
is Arrow’s semantically equivalent of an immutableVec<Option<Vec<u8>>>
. It implementsArray
. - Binary
View Array Generic - Boolean
Array - A
BooleanArray
is Arrow’s semantically equivalent of an immutableVec<Option<bool>>
. It implementsArray
. - Dictionary
Array - An
Array
whose values are stored as indices. ThisArray
is 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 List Array - The Arrow’s equivalent to an immutable
Vec<Option<[T; size]>>
whereT
is an Arrow type. Cloning and slicing this struct isO(1)
. - List
Array - An
Array
semantically equivalent toVec<Option<Vec<Option<T>>>>
with Arrow’s in-memory. - 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 aMutableBinaryArray
into aBinaryArray
isO(1)
. - Mutable
Binary Values Array - A
MutableArray
that builds aBinaryArray
. It differs fromMutableBinaryArray
in that it builds non-nullBinaryArray
. - Mutable
Binary View Array - Mutable
Boolean Array - The Arrow’s equivalent to
Vec<Option<bool>>
, but with1/16
of its size. Converting aMutableBooleanArray
into aBooleanArray
isO(1)
. - Mutable
Dictionary Array - Mutable
Fixed Size Binary Array - The Arrow’s equivalent to a mutable
Vec<Option<[u8; size]>>
. Converting aMutableFixedSizeBinaryArray
into aFixedSizeBinaryArray
isO(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>>
whereT
is byte-size (e.g.i32
). Converting aMutablePrimitiveArray
into aPrimitiveArray
isO(1)
. - Mutable
Utf8 Array - A
MutableArray
that builds aUtf8Array
. It differs fromMutableUtf8ValuesArray
in that it can build nullableUtf8Array
s. - Mutable
Utf8 Values Array - A
MutableArray
that builds aUtf8Array
. It differs fromMutableUtf8Array
in that it builds non-nullUtf8Array
. - Null
Array - The concrete
Array
ofArrowDataType::Null
. - Primitive
Array - A
PrimitiveArray
is Arrow’s semantically equivalent of an immutableVec<Option<T>>
where T isNativeType
(e.g.i32
). It implementsArray
. - Struct
Array - A
StructArray
is a nestedArray
with an optional validity representing multipleArray
with the same number of rows. - Union
Array UnionArray
represents an array whose each slot can contain different values.- Utf8
Array - A
Utf8Array
is 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
NativeType
s that can be used as keys of a dictionary. - Generic
Binary Array - Trait that
BinaryArray
andUtf8Array
implement for the purposes of DRY. - 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
Array
s. Two arrays are logically equal if and only if: - get_
display - Returns a function that writes the element of
array
at positionindex
to aWrite
, writingnull
to the null slots. - get_
value_ display - Returns a function that writes the value of the element of
array
at positionindex
to aWrite
, writingnull
in the null slots. - new_
empty_ array - Creates a new
Array
with aArray::len
of 0. - new_
null_ array - Creates a new
Array
ofArrowDataType
dtype
andlength
. - validate_
utf8_ view
Type Aliases§
- Array
Ref - Binary
Value Iter - Iterator of values of an
BinaryArray
. - Binary
View Array - Days
MsArray - A type definition
PrimitiveArray
fordays_ms
- Days
MsVec - A type definition
MutablePrimitiveArray
fordays_ms
- Float16
Array - A type definition
PrimitiveArray
forf16
- Float16
Vec - A type definition
MutablePrimitiveArray
forf16
- Float32
Array - A type definition
PrimitiveArray
forf32
- Float32
Vec - A type definition
MutablePrimitiveArray
forf32
- Float64
Array - A type definition
PrimitiveArray
forf64
- Float64
Vec - A type definition
MutablePrimitiveArray
forf64
- Int8
Array - A type definition
PrimitiveArray
fori8
- Int8Vec
- A type definition
MutablePrimitiveArray
fori8
- Int16
Array - A type definition
PrimitiveArray
fori16
- Int16
Vec - A type definition
MutablePrimitiveArray
fori16
- Int32
Array - A type definition
PrimitiveArray
fori32
- Int32
Vec - A type definition
MutablePrimitiveArray
fori32
- Int64
Array - A type definition
PrimitiveArray
fori64
- Int64
Vec - A type definition
MutablePrimitiveArray
fori64
- Int128
Array - A type definition
PrimitiveArray
fori128
- Int128
Vec - A type definition
MutablePrimitiveArray
fori128
- Int256
Array - A type definition
PrimitiveArray
fori256
- Int256
Vec - A type definition
MutablePrimitiveArray
fori256
- List
Values Iter - Iterator of values of a
ListArray
. - Months
Days NsArray - A type definition
PrimitiveArray
formonths_days_ns
- Months
Days NsVec - A type definition
MutablePrimitiveArray
formonths_days_ns
- Mutable
PlBinary - Mutable
PlString - UInt8
Array - A type definition
PrimitiveArray
foru8
- UInt8
Vec - A type definition
MutablePrimitiveArray
foru8
- UInt16
Array - A type definition
PrimitiveArray
foru16
- UInt16
Vec - A type definition
MutablePrimitiveArray
foru16
- UInt32
Array - A type definition
PrimitiveArray
foru32
- UInt32
Vec - A type definition
MutablePrimitiveArray
foru32
- UInt64
Array - A type definition
PrimitiveArray
foru64
- UInt64
Vec - A type definition
MutablePrimitiveArray
foru64
- Utf8
Values Iter - Iterator of values of an
Utf8Array
. - Utf8
View Array