Module datafusion_python::datafusion_common::arrow::array
source · Expand description
Statically typed implementations of Arrow Arrays
See arrow_array for examples and usage instructions
Modules§
- The concrete array definitions
- Defines push-based APIs for constructing arrays
- Defines helper functions for downcasting
dyn Arrayto concrete types - Contains declarations to bind to the C Data Interface.
- Contains declarations to bind to the C Stream Interface.
- Idiomatic iterators for
Array - Idiomatic iterator for
RunArray - Conversion methods for dates and times.
- Timezone for timestamp arrays
- Zero-sized types used to parameterize generic array implementations
Macros§
- Downcast an
Arrayto aDictionaryArraybased on itsDataType, accepts a number of subsequent patterns to match the data type - Given one or more expressions evaluating to an integer
DataTypeinvokes the provided macromwith the corresponding integerArrowPrimitiveType, followed by any additional arguments - Given one or more expressions evaluating to primitive
DataTypeinvokes the provided macromwith the correspondingArrowPrimitiveType, followed by any additional arguments - Downcast an
Arrayto aPrimitiveArraybased on itsDataTypeaccepts a number of subsequent patterns to match the data type - Given one or more expressions evaluating to an integer
DataTypeinvokes the provided macromwith the corresponding integerRunEndIndexType, followed by any additional arguments - Given one or more expressions evaluating to primitive
DataTypeinvokes the provided macromwith the correspondingArrowPrimitiveType, followed by any additional arguments - Downcast an
Arrayto a temporalPrimitiveArraybased on itsDataTypeaccepts a number of subsequent patterns to match the data type
Structs§
- A generic representation of Arrow array data which encapsulates common attributes and operations for Arrow array. Specific operations for different arrays types (e.g., primitive, list, struct) are implemented in
Array. - Builder for
ArrayDatatype - An iterator that returns Some(T) or None, that can be used on any
ArrayAccessor - An array of boolean values
- Builder for
BooleanBuffer - Builder for
BooleanArray - Builder for creating a Buffer object.
- Layout specification for a data type
- An array of dictionary encoded values
- An array of fixed size binary arrays
- Builder for
FixedSizeBinaryArray - An array of [fixed length lists], similar to JSON arrays (e.g.
["A", "B"]). - Builder for
FixedSizeListArray - An array of variable length byte arrays
- Builder for
GenericByteArray - Builder for
DictionaryArrayofGenericByteArray - Builder for
RunArrayofGenericByteArray - Variable-size Binary View Layout: An array of variable length bytes view arrays.
- A builder for
GenericByteViewArray - An array of variable length lists, similar to JSON arrays (e.g.
["A", "B", "C"]). - Builder for
GenericListArray - An array of key-value maps
- Builder for
MapArray - An optional primitive value
- An array of null values
- Builder for
NullArray - An array of primitive values, of type
ArrowPrimitiveType - Builder for
PrimitiveArray - Builder for
DictionaryArrayofPrimitiveArray - Builder for
RunArrayofPrimitiveArray - A two-dimensional batch of column-oriented data with a defined schema.
- Generic implementation of RecordBatchReader that wraps an iterator.
- Options that control the behaviour used when creating a
RecordBatch. - An array of run-end encoded values
- An array of structs
- Builder for
StructArray - A
DictionaryArraytyped on its child values array - A
RunArraytyped typed on its child values array - An array of values of varying types
- Builder for
UnionArray
Enums§
- Layout specification for a single data type buffer
- Define capacities of child data or data buffers.
Traits§
- A
DictionaryArraywith the key type erased - An array in the arrow columnar format
- A generic trait for accessing the values of an
Array - Trait for dealing with different array builders at runtime
- Trait for
ArrowNativeTypethat adds checked and unchecked arithmetic operations, and totally ordered comparison operations - A subtype of primitive type that represents numeric values.
- Trait for primitive values, bridging the dynamic-typed nature of Arrow (via
DataType) with the static-typed nature of rust types (ArrowNativeType) for all types that implementArrowNativeType. - An extension trait for
dyn Arraythat provides ergonomic downcasting - A type that can be used within a variable-size array to encode offset information
- Trait for types that can read
RecordBatch’s. - Trait for types that can write
RecordBatch’s.
Functions§
- as_
decimal_ array Deprecated Force downcast of an Array, such as an ArrayRef to Decimal128Array, panic’ing on failure. - Downcasts a
dyn Arrayto a concrete type - export_
array_ ⚠into_ raw Deprecated Exports an array to raw pointers of the C Data Interface provided by the consumer. - Return the expected
DataTypeLayoutArrays of this data type are expected to have - Constructs an array using the input
data. Returns a reference-countedArrayinstance. - Returns a builder with capacity
capacitythat corresponds to the datatypeDataTypeThis function is useful to construct arrays from an arbitrary vectors with known/expected schema. - Returns a comparison function that compares two values at two different positions between the two arrays.
- Create a view based on the given data, block id and offset Note that the code below is carefully examined with x86_64 assembly code: https://godbolt.org/z/685YPsd5G The goal is to avoid calling into
ptr::copy_non_interleave, which makes function call (i.e., not inlined), which slows down things. - Creates a new empty array
- Creates a new array of
data_typeof lengthlengthfilled entirely ofNULLvalues
Type Aliases§
- A reference-counted reference to a generic
Array - Builder for
BinaryArray - Builder for
DictionaryArrayofBinaryArray - Builder for
RunArrayofBinaryArray - A
GenericByteViewArrayof[u8] - Array builder for
BinaryViewArray - an iterator that returns Some(T) or None, that can be used on any BooleanArray
- A
PrimitiveArrayof days since UNIX epoch stored asi32 - Buffer builder for 32-bit date type.
- A 32-bit date array builder.
- A
PrimitiveArrayof milliseconds since UNIX epoch stored asi64 - Buffer builder for 64-bit date type.
- A 64-bit date array builder.
- A
PrimitiveArrayof 128-bit fixed point decimals - Buffer builder for 128-bit decimal type.
- A decimal 128 array builder
- A
PrimitiveArrayof 256-bit fixed point decimals - Buffer builder for 256-bit decimal type.
- A decimal 256 array builder
- A
PrimitiveArrayof elapsed durations in microseconds - Buffer builder for elaspsed time of microseconds unit.
- An elapsed time in microseconds array builder.
- A
PrimitiveArrayof elapsed durations in milliseconds - Buffer builder for elaspsed time of milliseconds unit.
- An elapsed time in milliseconds array builder.
- A
PrimitiveArrayof elapsed durations in nanoseconds - Buffer builder for elaspsed time of nanoseconds unit.
- An elapsed time in nanoseconds array builder.
- A
PrimitiveArrayof elapsed durations in seconds - Buffer builder for elaspsed time of second unit.
- An elapsed time in seconds array builder.
- Compare the values at two arbitrary indices in two arrays.
- an iterator that returns Some(T) or None, that can be used on any FixedSizeBinaryArray
- an iterator that returns Some(T) or None, that can be used on any FixedSizeListArray
- A
PrimitiveArrayoff16 - Buffer builder for 16-bit floating point type.
- A 16-bit floating point array builder.
- A
PrimitiveArrayoff32 - Buffer builder for 32-bit floating point type.
- A 32-bit floating point array builder.
- A
PrimitiveArrayoff64 - Buffer builder for 64-bit floating point type.
- A 64-bit floating point array builder.
- A
GenericBinaryArrayfor storing[u8] - Array builder for
GenericBinaryArray - an iterator that returns Some(T) or None, that can be used on any BinaryArray
- an iterator that returns Some(T) or None, that can be used on any ListArray
- A
GenericByteArrayfor storingstr - Array builder for
GenericStringArray - an iterator that returns Some(T) or None, that can be used on any Utf8Array
- A
PrimitiveArrayofi8 - Buffer builder for signed 8-bit integer type.
- A signed 8-bit integer array builder.
- A
DictionaryArrayindexed byi8 - A
PrimitiveArrayofi16 - Buffer builder for signed 16-bit integer type.
- A signed 16-bit integer array builder.
- A
DictionaryArrayindexed byi16 - A
RunArraywithi16run ends - A
PrimitiveArrayofi32 - Buffer builder for signed 32-bit integer type.
- A signed 32-bit integer array builder.
- A
DictionaryArrayindexed byi32 - A
RunArraywithi32run ends - A
PrimitiveArrayofi64 - Buffer builder for signed 64-bit integer type.
- A signed 64-bit integer array builder.
- A
DictionaryArrayindexed byi64 - A
RunArraywithi64run ends - A
PrimitiveArrayof “calendar” intervals in days and milliseconds - Buffer builder for “calendar” interval in days and milliseconds.
- A “calendar” interval in days and milliseconds array builder.
- A
PrimitiveArrayof “calendar” intervals in months, days, and nanoseconds. - Buffer builder “calendar” interval in months, days, and nanoseconds.
- A “calendar” interval in months, days, and nanoseconds array builder.
- A
PrimitiveArrayof “calendar” intervals in whole months - Buffer builder for “calendar” interval in months.
- A “calendar” interval in months array builder.
- Builder for
LargeBinaryArray - Builder for
DictionaryArrayofLargeBinaryArray - Builder for
RunArrayofLargeBinaryArray - A
GenericListArrayof variable size lists, storing offsets asi64. - Builder for
LargeListArray - Builder for
LargeStringArray - Builder for
DictionaryArrayofLargeStringArray - Builder for
RunArrayofLargeStringArray - A
GenericListArrayof variable size lists, storing offsets asi32. - Builder for
ListArray - an iterator that returns Some(T) or None, that can be used on any MapArray
- an iterator that returns Some(T) or None, that can be used on any PrimitiveArray
- Builder for
StringArray - Builder for
DictionaryArrayofStringArray - Builder for
RunArrayofStringArray - A
GenericByteViewArraythat stores utf8 data - Array builder for
StringViewArray - A
PrimitiveArrayof milliseconds since midnight stored asi32 - Buffer builder for 32-bit elaspsed time since midnight of millisecond unit.
- A 32-bit elaspsed time in milliseconds array builder.
- A
PrimitiveArrayof seconds since midnight stored asi32 - Buffer builder for 32-bit elaspsed time since midnight of second unit.
- A 32-bit elaspsed time in seconds array builder.
- A
PrimitiveArrayof microseconds since midnight stored asi64 - Buffer builder for 64-bit elaspsed time since midnight of microsecond unit.
- A 64-bit elaspsed time in microseconds array builder.
- A
PrimitiveArrayof nanoseconds since midnight stored asi64 - Buffer builder for 64-bit elaspsed time since midnight of nanosecond unit.
- A 64-bit elaspsed time in nanoseconds array builder.
- A
PrimitiveArrayof microseconds since UNIX epoch stored asi64 - Buffer builder for timestamp type of microsecond unit.
- A timestamp microsecond array builder.
- A
PrimitiveArrayof milliseconds since UNIX epoch stored asi64 - Buffer builder for timestamp type of millisecond unit.
- A timestamp millisecond array builder.
- A
PrimitiveArrayof nanoseconds since UNIX epoch stored asi64 - Buffer builder for timestamp type of nanosecond unit.
- A timestamp nanosecond array builder.
- A
PrimitiveArrayof seconds since UNIX epoch stored asi64 - Buffer builder for timestamp type of second unit.
- A timestamp second array builder.
- A
PrimitiveArrayofu8 - Buffer builder for usigned 8-bit integer type.
- An usigned 8-bit integer array builder.
- A
DictionaryArrayindexed byu8 - A
PrimitiveArrayofu16 - Buffer builder for usigned 16-bit integer type.
- An usigned 16-bit integer array builder.
- A
DictionaryArrayindexed byu16 - A
PrimitiveArrayofu32 - Buffer builder for usigned 32-bit integer type.
- An usigned 32-bit integer array builder.
- A
DictionaryArrayindexed byu32 - A
PrimitiveArrayofu64 - Buffer builder for usigned 64-bit integer type.
- An usigned 64-bit integer array builder.
- A
DictionaryArrayindexed byu64