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
andMutableStructArray
, 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 downcasted
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§
- A
BinaryArray
is Arrow’s semantically equivalent of an immutableVec<Option<Vec<u8>>>
. It implementsArray
. - A
BooleanArray
is Arrow’s semantically equivalent of an immutableVec<Option<bool>>
. It implementsArray
. - The Arrow’s equivalent to an immutable
Vec<Option<[u8; size]>>
. Cloning and slicing this struct isO(1)
. - The Arrow’s equivalent to an immutable
Vec<Option<[T; size]>>
whereT
is an Arrow type. Cloning and slicing this struct isO(1)
. - An
Array
semantically equivalent toVec<Option<Vec<Option<T>>>>
with Arrow’s in-memory. - An array representing a (key, value), both of arbitrary logical types.
- The Arrow’s equivalent to
Vec<Option<Vec<u8>>>
. Converting aMutableBinaryArray
into aBinaryArray
isO(1)
. - A
MutableArray
that builds aBinaryArray
. It differs fromMutableBinaryArray
in that it builds non-nullBinaryArray
. - The Arrow’s equivalent to
Vec<Option<bool>>
, but with1/16
of its size. Converting aMutableBooleanArray
into aBooleanArray
isO(1)
. - The Arrow’s equivalent to a mutable
Vec<Option<[u8; size]>>
. Converting aMutableFixedSizeBinaryArray
into aFixedSizeBinaryArray
isO(1)
. - The mutable version of
FixedSizeListArray
. - The mutable version of
ListArray
. - A distinct type to disambiguate clashing methods
- The Arrow’s equivalent to
Vec<Option<T>>
whereT
is byte-size (e.g.i32
). Converting aMutablePrimitiveArray
into aPrimitiveArray
isO(1)
. - A
MutableArray
that builds aUtf8Array
. It differs fromMutableUtf8ValuesArray
in that it can build nullableUtf8Array
s. - A
MutableArray
that builds aUtf8Array
. It differs fromMutableUtf8Array
in that it builds non-nullUtf8Array
. - The concrete
Array
ofArrowDataType::Null
. - A
PrimitiveArray
is Arrow’s semantically equivalent of an immutableVec<Option<T>>
where T isNativeType
(e.g.i32
). It implementsArray
. - A
StructArray
is a nestedArray
with an optional validity representing multipleArray
with the same number of rows. UnionArray
represents an array whose each slot can contain different values.- A
Utf8Array
is arrow’s semantic equivalent of an immutableVec<Option<String>>
. Cloning and slicing this struct isO(1)
. - A reference to a set of bytes.
Traits§
- A trait representing an immutable Arrow array. Arrow arrays are trait objects that are infallibly downcasted to concrete types according to the
Array::dtype
. - Trait denoting
NativeType
s that can be used as keys of a dictionary. - Trait that
BinaryArray
andUtf8Array
implement for the purposes of DRY. - A trait describing a mutable array; i.e. an array whose values can be changed.
- A trait describing the ability of a struct to receive new items.
- 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. - A trait describing the ability of a struct to extend from a reference of itself. Specialization of
TryExtend
. - A trait describing the ability of a struct to receive new items.
Functions§
- Clones a dynamic
Array
. - Logically compares two
Array
s. Two arrays are logically equal if and only if: - Returns a function that writes the element of
array
at positionindex
to aWrite
, writingnull
to the null slots. - Returns a function that writes the value of the element of
array
at positionindex
to aWrite
, writingnull
in the null slots. - Creates a new
Array
with aArray::len
of 0.
Type Aliases§
- Iterator of values of an
BinaryArray
. - A type definition
PrimitiveArray
fordays_ms
- A type definition
MutablePrimitiveArray
fordays_ms
- A type definition
PrimitiveArray
forf16
- A type definition
MutablePrimitiveArray
forf16
- A type definition
PrimitiveArray
forf32
- A type definition
MutablePrimitiveArray
forf32
- A type definition
PrimitiveArray
forf64
- A type definition
MutablePrimitiveArray
forf64
- A type definition
PrimitiveArray
fori8
- A type definition
MutablePrimitiveArray
fori8
- A type definition
PrimitiveArray
fori16
- A type definition
MutablePrimitiveArray
fori16
- A type definition
PrimitiveArray
fori32
- A type definition
MutablePrimitiveArray
fori32
- A type definition
PrimitiveArray
fori64
- A type definition
MutablePrimitiveArray
fori64
- A type definition
PrimitiveArray
fori128
- A type definition
MutablePrimitiveArray
fori128
- A type definition
PrimitiveArray
fori256
- A type definition
MutablePrimitiveArray
fori256
- Iterator of values of a
ListArray
. - A type definition
PrimitiveArray
formonths_days_ns
- A type definition
MutablePrimitiveArray
formonths_days_ns
- A type definition
PrimitiveArray
foru8
- A type definition
MutablePrimitiveArray
foru8
- A type definition
PrimitiveArray
foru16
- A type definition
MutablePrimitiveArray
foru16
- A type definition
PrimitiveArray
foru32
- A type definition
MutablePrimitiveArray
foru32
- A type definition
PrimitiveArray
foru64
- A type definition
MutablePrimitiveArray
foru64
- Iterator of values of an
Utf8Array
.