Expand description
Statically typed implementations of Arrow Arrays
See [arrow_array] for examples and usage instructions
Modules§
- array
- The concrete array definitions
- builder
- Defines push-based APIs for constructing arrays
- cast
- Defines helper functions for downcasting
dyn Array
to concrete types - ffi
- Contains declarations to bind to the C Data Interface.
- ffi_
stream - Contains declarations to bind to the C Stream Interface.
- iterator
- Idiomatic iterators for
Array
- run_
iterator - Idiomatic iterator for
RunArray
- temporal_
conversions - Conversion methods for dates and times.
- timezone
- Timezone for timestamp arrays
- types
- Zero-sized types used to parameterize generic array implementations
Macros§
- create_
array - Creates an array from a literal slice of values, suitable for rapid testing and development.
- downcast_
dictionary_ array - Downcast an
Array
to aDictionaryArray
based on itsDataType
, accepts a number of subsequent patterns to match the data type - downcast_
integer - Given one or more expressions evaluating to an integer
DataType
invokes the provided macrom
with the corresponding integerArrowPrimitiveType
, followed by any additional arguments - downcast_
primitive - Given one or more expressions evaluating to primitive
DataType
invokes the provided macrom
with the correspondingArrowPrimitiveType
, followed by any additional arguments - downcast_
primitive_ array - Downcast an
Array
to aPrimitiveArray
based on itsDataType
accepts a number of subsequent patterns to match the data type - downcast_
run_ array - Downcast an
Array
to aRunArray
based on itsDataType
, accepts a number of subsequent patterns to match the data type - downcast_
run_ end_ index - Given one or more expressions evaluating to an integer
DataType
invokes the provided macrom
with the corresponding integerRunEndIndexType
, followed by any additional arguments - downcast_
temporal - Given one or more expressions evaluating to primitive
DataType
invokes the provided macrom
with the correspondingArrowPrimitiveType
, followed by any additional arguments - downcast_
temporal_ array - Downcast an
Array
to a temporalPrimitiveArray
based on itsDataType
accepts a number of subsequent patterns to match the data type - record_
batch - Creates a record batch from literal slice of values, suitable for rapid testing and development.
Structs§
- Array
Data - A generic representation of Arrow array data which encapsulates common attributes and operations for Arrow array.
- Array
Data Builder - Builder for
ArrayData
type - Array
Iter - An iterator that returns Some(T) or None, that can be used on any
ArrayAccessor
- Boolean
Array - An array of boolean values
- Boolean
Buffer Builder - Builder for
BooleanBuffer
- Boolean
Builder - Builder for
BooleanArray
- Buffer
Builder - Builder for creating a Buffer object.
- Byte
View - Helper to access views of
GenericByteViewArray
(StringViewArray
andBinaryViewArray
) where the length is greater than 12 bytes. - Data
Type Layout - Layout specification for a data type
- Dictionary
Array - An array of dictionary encoded values
- Fixed
Size Binary Array - An array of fixed size binary arrays
- Fixed
Size Binary Builder - Builder for
FixedSizeBinaryArray
- Fixed
Size List Array - An array of [fixed length lists], similar to JSON arrays
(e.g.
["A", "B"]
). - Fixed
Size List Builder - Builder for
FixedSizeListArray
- Generic
Byte Array - An array of variable length byte arrays
- Generic
Byte Builder - Builder for
GenericByteArray
- Generic
Byte Dictionary Builder - Builder for
DictionaryArray
ofGenericByteArray
- Generic
Byte RunBuilder - Builder for
RunArray
ofGenericByteArray
- Generic
Byte View Array - Variable-size Binary View Layout: An array of variable length bytes views.
- Generic
Byte View Builder - A builder for
GenericByteViewArray
- Generic
List Array - An array of variable length lists, similar to JSON arrays
(e.g.
["A", "B", "C"]
). This struct specifically represents the list layout. Refer toGenericListViewArray
for the list-view layout. - Generic
List Builder - Builder for
GenericListArray
- Generic
List View Array - An array of variable length lists, specifically in the list-view layout.
- Generic
List View Builder - Builder for
GenericListViewArray
- MapArray
- An array of key-value maps
- MapBuilder
- Builder for
MapArray
- MapField
Names - The
Field
names for aMapArray
- Mutable
Array Data - Efficiently create an ArrayData from one or more existing ArrayDatas by copying chunks.
- Native
Adapter - An optional primitive value
- Null
Array - An array of null values
- Null
Buffer Builder - Builder for creating
NullBuffer
- Null
Builder - Builder for
NullArray
- Offset
Buffer Builder - Builder of
OffsetBuffer
- Primitive
Array - An array of primitive values, of type
ArrowPrimitiveType
- Primitive
Builder - Builder for
PrimitiveArray
- Primitive
Dictionary Builder - Builder for
DictionaryArray
ofPrimitiveArray
- Primitive
RunBuilder - Builder for
RunArray
ofPrimitiveArray
- Record
Batch - A two-dimensional batch of column-oriented data with a defined schema.
- Record
Batch Iterator - Generic implementation of RecordBatchReader that wraps an iterator.
- Record
Batch Options - Options that control the behaviour used when creating a
RecordBatch
. - RunArray
- An array of run-end encoded values
- Scalar
- A wrapper around a single value
Array
that implementsDatum
and indicates compute kernels should treat this array as a scalar value (a single value). - Struct
Array - An array of structs
- Struct
Builder - Builder for
StructArray
- Typed
Dictionary Array - A
DictionaryArray
typed on its child values array - Typed
RunArray - A
RunArray
typed typed on its child values array - Union
Array - An array of values of varying types
- Union
Builder - Builder for
UnionArray
Enums§
- Buffer
Spec - Layout specification for a single data type buffer
- Capacities
- Define capacities to pre-allocate for child data or data buffers.
Traits§
- AnyDictionary
Array - A
DictionaryArray
with the key type erased - Array
- An array in the arrow columnar format
- Array
Accessor - A generic trait for accessing the values of an
Array
- Array
Builder - Trait for dealing with different array builders at runtime
- Arrow
Native Type Op - Trait for
ArrowNativeType
that adds checked and unchecked arithmetic operations, and totally ordered comparison operations - Arrow
Numeric Type - A subtype of primitive type that represents numeric values.
- Arrow
Primitive Type - Trait for primitive values.
- AsArray
- An extension trait for
dyn Array
that provides ergonomic downcasting - Binary
Array Type - A trait for Arrow String Arrays, currently three types are supported:
- Datum
- A possibly
Scalar
Array
- Offset
Size Trait - A type that can be used within a variable-size array to encode offset information
- Record
Batch Reader - Trait for types that can read
RecordBatch
’s. - Record
Batch Writer - Trait for types that can write
RecordBatch
’s. - String
Array Type - A trait for Arrow String Arrays, currently three types are supported:
Functions§
- as_
boolean_ array - Force downcast of an
Array
, such as anArrayRef
toBooleanArray
, panicking on failure. - as_
dictionary_ array - Force downcast of an
Array
, such as anArrayRef
toDictionaryArray<T>
, panic’ing on failure. - as_
fixed_ size_ list_ array - Force downcast of an
Array
, such as anArrayRef
toFixedSizeListArray
, panicking on failure. - as_
generic_ binary_ array - Force downcast of an
Array
, such as anArrayRef
toGenericBinaryArray<S>
, panicking on failure. - as_
generic_ list_ array - Force downcast of an
Array
, such as anArrayRef
toGenericListArray<T>
, panicking on failure. - as_
large_ list_ array - Force downcast of an
Array
, such as anArrayRef
toLargeListArray
, panicking on failure. - as_
largestring_ array - Force downcast of an
Array
, such as anArrayRef
toLargeStringArray
, panicking on failure. - as_
list_ array - Force downcast of an
Array
, such as anArrayRef
toListArray
, panicking on failure. - as_
map_ array - Force downcast of an
Array
, such as anArrayRef
toMapArray
, panicking on failure. - as_
null_ array - Force downcast of an
Array
, such as anArrayRef
toNullArray
, panicking on failure. - as_
primitive_ array - Force downcast of an
Array
, such as anArrayRef
, toPrimitiveArray<T>
, panic’ing on failure. - as_
run_ array - Force downcast of an
Array
, such as anArrayRef
toRunArray<T>
, panic’ing on failure. - as_
string_ array - Force downcast of an
Array
, such as anArrayRef
toStringArray
, panicking on failure. - as_
struct_ array - Force downcast of an
Array
, such as anArrayRef
toStructArray
, panicking on failure. - as_
union_ array - Force downcast of an
Array
, such as anArrayRef
toUnionArray
, panicking on failure. - downcast_
array - Downcasts a
dyn Array
to a concrete type - export_
array_ ⚠into_ raw Deprecated - Exports an array to raw pointers of the C Data Interface provided by the consumer.
- layout
- Return the expected
DataTypeLayout
Arrays of this data type are expected to have - make_
array - Constructs an array using the input
data
. Returns a reference-countedArray
instance. - make_
builder - Returns a builder with capacity for
capacity
elements of datatypeDataType
. - make_
comparator - Returns a comparison function that compares two values at two different positions between the two arrays.
- make_
view - Create a view based on the given data, block id and offset.
- new_
empty_ array - Creates a new empty array
- new_
null_ array - Creates a new array of
data_type
of lengthlength
filled entirely ofNULL
values
Type Aliases§
- Array
Data Ref - A thread-safe, shared reference to the Arrow array data.
- Array
Ref - A reference-counted reference to a generic
Array
- Binary
Array - A
GenericBinaryArray
of[u8]
usingi32
offsets - Binary
Builder - Builder for
BinaryArray
- Binary
Dictionary Builder - Builder for
DictionaryArray
ofBinaryArray
- Binary
RunBuilder - Builder for
RunArray
ofBinaryArray
- Binary
View Array - A
GenericByteViewArray
of[u8]
- Binary
View Builder - Array builder for
BinaryViewArray
- Boolean
Iter - an iterator that returns Some(T) or None, that can be used on any BooleanArray
- Date32
Array - A
PrimitiveArray
of days since UNIX epoch stored asi32
- Date32
Buffer Builder - Buffer builder for 32-bit date type.
- Date32
Builder - A 32-bit date array builder.
- Date64
Array - A
PrimitiveArray
of milliseconds since UNIX epoch stored asi64
- Date64
Buffer Builder - Buffer builder for 64-bit date type.
- Date64
Builder - A 64-bit date array builder.
- Decimal128
Array - A
PrimitiveArray
of 128-bit fixed point decimals - Decimal128
Buffer Builder - Buffer builder for 128-bit decimal type.
- Decimal128
Builder - A decimal 128 array builder
- Decimal256
Array - A
PrimitiveArray
of 256-bit fixed point decimals - Decimal256
Buffer Builder - Buffer builder for 256-bit decimal type.
- Decimal256
Builder - A decimal 256 array builder
- Duration
Microsecond Array - A
PrimitiveArray
of elapsed durations in microseconds - Duration
Microsecond Buffer Builder - Buffer builder for elaspsed time of microseconds unit.
- Duration
Microsecond Builder - An elapsed time in microseconds array builder.
- Duration
Millisecond Array - A
PrimitiveArray
of elapsed durations in milliseconds - Duration
Millisecond Buffer Builder - Buffer builder for elaspsed time of milliseconds unit.
- Duration
Millisecond Builder - An elapsed time in milliseconds array builder.
- Duration
Nanosecond Array - A
PrimitiveArray
of elapsed durations in nanoseconds - Duration
Nanosecond Buffer Builder - Buffer builder for elaspsed time of nanoseconds unit.
- Duration
Nanosecond Builder - An elapsed time in nanoseconds array builder.
- Duration
Second Array - A
PrimitiveArray
of elapsed durations in seconds - Duration
Second Buffer Builder - Buffer builder for elaspsed time of second unit.
- Duration
Second Builder - An elapsed time in seconds array builder.
- DynComparator
- Compare the values at two arbitrary indices in two arrays.
- Fixed
Size Binary Iter - an iterator that returns Some(T) or None, that can be used on any FixedSizeBinaryArray
- Fixed
Size List Iter - an iterator that returns Some(T) or None, that can be used on any FixedSizeListArray
- Float16
Array - A
PrimitiveArray
off16
- Float16
Buffer Builder - Buffer builder for 16-bit floating point type.
- Float16
Builder - A 16-bit floating point array builder.
- Float32
Array - A
PrimitiveArray
off32
- Float32
Buffer Builder - Buffer builder for 32-bit floating point type.
- Float32
Builder - A 32-bit floating point array builder.
- Float64
Array - A
PrimitiveArray
off64
- Float64
Buffer Builder - Buffer builder for 64-bit floating point type.
- Float64
Builder - A 64-bit floating point array builder.
- Generic
Binary Array - A
GenericBinaryArray
for storing[u8]
- Generic
Binary Builder - Array builder for
GenericBinaryArray
- Generic
Binary Iter - an iterator that returns Some(T) or None, that can be used on any BinaryArray
- Generic
List Array Iter - an iterator that returns Some(T) or None, that can be used on any ListArray
- Generic
List View Array Iter - an iterator that returns Some(T) or None, that can be used on any ListArray
- Generic
String Array - A
GenericByteArray
for storingstr
- Generic
String Builder - Array builder for
GenericStringArray
- Generic
String Iter - an iterator that returns Some(T) or None, that can be used on any Utf8Array
- Int8
Array - A
PrimitiveArray
ofi8
- Int8
Buffer Builder - Buffer builder for signed 8-bit integer type.
- Int8
Builder - A signed 8-bit integer array builder.
- Int8
Dictionary Array - A
DictionaryArray
indexed byi8
- Int16
Array - A
PrimitiveArray
ofi16
- Int16
Buffer Builder - Buffer builder for signed 16-bit integer type.
- Int16
Builder - A signed 16-bit integer array builder.
- Int16
Dictionary Array - A
DictionaryArray
indexed byi16
- Int16
RunArray - A
RunArray
withi16
run ends - Int32
Array - A
PrimitiveArray
ofi32
- Int32
Buffer Builder - Buffer builder for signed 32-bit integer type.
- Int32
Builder - A signed 32-bit integer array builder.
- Int32
Dictionary Array - A
DictionaryArray
indexed byi32
- Int32
RunArray - A
RunArray
withi32
run ends - Int64
Array - A
PrimitiveArray
ofi64
- Int64
Buffer Builder - Buffer builder for signed 64-bit integer type.
- Int64
Builder - A signed 64-bit integer array builder.
- Int64
Dictionary Array - A
DictionaryArray
indexed byi64
- Int64
RunArray - A
RunArray
withi64
run ends - Interval
DayTime Array - A
PrimitiveArray
of “calendar” intervals in days and milliseconds - Interval
DayTime Buffer Builder - Buffer builder for “calendar” interval in days and milliseconds.
- Interval
DayTime Builder - A “calendar” interval in days and milliseconds array builder.
- Interval
Month DayNano Array - A
PrimitiveArray
of “calendar” intervals in months, days, and nanoseconds. - Interval
Month DayNano Buffer Builder - Buffer builder “calendar” interval in months, days, and nanoseconds.
- Interval
Month DayNano Builder - A “calendar” interval in months, days, and nanoseconds array builder.
- Interval
Year Month Array - A
PrimitiveArray
of “calendar” intervals in whole months - Interval
Year Month Buffer Builder - Buffer builder for “calendar” interval in months.
- Interval
Year Month Builder - A “calendar” interval in months array builder.
- Large
Binary Array - A
GenericBinaryArray
of[u8]
usingi64
offsets - Large
Binary Builder - Builder for
LargeBinaryArray
- Large
Binary Dictionary Builder - Builder for
DictionaryArray
ofLargeBinaryArray
- Large
Binary RunBuilder - Builder for
RunArray
ofLargeBinaryArray
- Large
List Array - A
GenericListArray
of variable size lists, storing offsets asi64
. - Large
List Builder - Builder for
LargeListArray
- Large
List View Array - A
GenericListViewArray
of variable size lists, storing offsets asi64
. - Large
List View Builder - Builder for
LargeListViewArray
- Large
String Array - A
GenericStringArray
ofstr
usingi64
offsets - Large
String Builder - Builder for
LargeStringArray
- Large
String Dictionary Builder - Builder for
DictionaryArray
ofLargeStringArray
- Large
String RunBuilder - Builder for
RunArray
ofLargeStringArray
- List
Array - A
GenericListArray
of variable size lists, storing offsets asi32
. - List
Builder - Builder for
ListArray
- List
View Array - A
GenericListViewArray
of variable size lists, storing offsets asi32
. - List
View Builder - Builder for
ListViewArray
- MapArray
Iter - an iterator that returns Some(T) or None, that can be used on any MapArray
- Primitive
Iter - an iterator that returns Some(T) or None, that can be used on any PrimitiveArray
- String
Array - A
GenericStringArray
ofstr
usingi32
offsets - String
Builder - Builder for
StringArray
- String
Dictionary Builder - Builder for
DictionaryArray
ofStringArray
- String
RunBuilder - Builder for
RunArray
ofStringArray
- String
View Array - A
GenericByteViewArray
that stores utf8 data - String
View Builder - Array builder for
StringViewArray
- Time32
Millisecond Array - A
PrimitiveArray
of milliseconds since midnight stored asi32
- Time32
Millisecond Buffer Builder - Buffer builder for 32-bit elaspsed time since midnight of millisecond unit.
- Time32
Millisecond Builder - A 32-bit elaspsed time in milliseconds array builder.
- Time32
Second Array - A
PrimitiveArray
of seconds since midnight stored asi32
- Time32
Second Buffer Builder - Buffer builder for 32-bit elaspsed time since midnight of second unit.
- Time32
Second Builder - A 32-bit elaspsed time in seconds array builder.
- Time64
Microsecond Array - A
PrimitiveArray
of microseconds since midnight stored asi64
- Time64
Microsecond Buffer Builder - Buffer builder for 64-bit elaspsed time since midnight of microsecond unit.
- Time64
Microsecond Builder - A 64-bit elaspsed time in microseconds array builder.
- Time64
Nanosecond Array - A
PrimitiveArray
of nanoseconds since midnight stored asi64
- Time64
Nanosecond Buffer Builder - Buffer builder for 64-bit elaspsed time since midnight of nanosecond unit.
- Time64
Nanosecond Builder - A 64-bit elaspsed time in nanoseconds array builder.
- Timestamp
Microsecond Array - A
PrimitiveArray
of microseconds since UNIX epoch stored asi64
- Timestamp
Microsecond Buffer Builder - Buffer builder for timestamp type of microsecond unit.
- Timestamp
Microsecond Builder - A timestamp microsecond array builder.
- Timestamp
Millisecond Array - A
PrimitiveArray
of milliseconds since UNIX epoch stored asi64
- Timestamp
Millisecond Buffer Builder - Buffer builder for timestamp type of millisecond unit.
- Timestamp
Millisecond Builder - A timestamp millisecond array builder.
- Timestamp
Nanosecond Array - A
PrimitiveArray
of nanoseconds since UNIX epoch stored asi64
- Timestamp
Nanosecond Buffer Builder - Buffer builder for timestamp type of nanosecond unit.
- Timestamp
Nanosecond Builder - A timestamp nanosecond array builder.
- Timestamp
Second Array - A
PrimitiveArray
of seconds since UNIX epoch stored asi64
- Timestamp
Second Buffer Builder - Buffer builder for timestamp type of second unit.
- Timestamp
Second Builder - A timestamp second array builder.
- UInt8
Array - A
PrimitiveArray
ofu8
- UInt8
Buffer Builder - Buffer builder for usigned 8-bit integer type.
- UInt8
Builder - An usigned 8-bit integer array builder.
- UInt8
Dictionary Array - A
DictionaryArray
indexed byu8
- UInt16
Array - A
PrimitiveArray
ofu16
- UInt16
Buffer Builder - Buffer builder for usigned 16-bit integer type.
- UInt16
Builder - An usigned 16-bit integer array builder.
- UInt16
Dictionary Array - A
DictionaryArray
indexed byu16
- UInt32
Array - A
PrimitiveArray
ofu32
- UInt32
Buffer Builder - Buffer builder for usigned 32-bit integer type.
- UInt32
Builder - An usigned 32-bit integer array builder.
- UInt32
Dictionary Array - A
DictionaryArray
indexed byu32
- UInt64
Array - A
PrimitiveArray
ofu64
- UInt64
Buffer Builder - Buffer builder for usigned 64-bit integer type.
- UInt64
Builder - An usigned 64-bit integer array builder.
- UInt64
Dictionary Array - A
DictionaryArray
indexed byu64