Expand description
Vortex crate containing core logic for encoding and memory representation of arrays.
At the heart of Vortex are arrays.
Arrays are typed views of memory buffers that hold scalars. These buffers can be held in a number of physical encodings to perform lightweight compression that exploits the particular data distribution of the array’s values.
Every data type recognized by Vortex also has a canonical physical encoding format, which arrays can be canonicalized into for ease of access in compute functions.
Modules§
- accessor
- aggregate_
fn - Aggregate function vtable machinery.
- arrays
- All the built-in encoding schemes and arrays.
- arrow
- Utilities to work with
Arrowdata and types. - buffer
- builders
- Builders for Vortex arrays.
- builtins
- A collection of built-in common scalar functions.
- compute
- display
- dtype
- A type system for Vortex
- expr
- Vortex’s expression language.
- extension
- Extension types.
- flatbuffers
- Re-exported autogenerated code from the core Vortex flatbuffer definitions.
- iter
- Iterator over slices of an array, and related utilities.
- kernel
- Parent kernels: child-driven fused execution of parent arrays.
- mask
- matcher
- memory
- Session-scoped memory allocation for host-side buffers.
- normalize
- optimizer
- The optimizer applies metadata-only rewrite rules (
reduceandreduce_parent) in a fixpoint loop until no more transformations are possible. - patches
- scalar
- Scalar values and types for the Vortex system.
- scalar_
fn - Scalar function vtable machinery.
- search_
sorted - serde
- session
- stats
- Traits and utilities to compute and access array statistics.
- stream
- test_
harness - validity
- Array validity and nullability behavior, used by arrays and compute functions.
- variants
- This module defines extension functionality specific to each Vortex DType.
- vtable
- This module contains the VTable definitions for a Vortex encoding.
Macros§
- assert_
arrays_ eq - assert_
nth_ scalar - Asserts that the scalar at position
$nin array$arrequals$expected. - assert_
nth_ scalar_ is_ null - Asserts that the scalar at position
$nin array$arris null. - field_
path - A helpful constructor for creating
FieldPaths to nested struct fields of the formatfield_path!(x.y.z) - match_
each_ decimal_ value - Matches over each decimal value variant, binding the inner value to a variable.
- match_
each_ decimal_ value_ type - Macro to match over each decimal value type, binding the corresponding native type (from
DecimalType) - match_
each_ float_ ptype - Macro to match over each floating point type, binding the corresponding native type (from
NativePType) - match_
each_ integer_ ptype - Macro to match over each integer PType, binding the corresponding native type (from
NativePType) - match_
each_ native_ ptype - Macro to match over each PType, binding the corresponding native type (from
NativePType) - match_
each_ native_ simd_ ptype - Macro to match over each SIMD capable
PType, binding the corresponding native type (fromNativePType) - match_
each_ pvalue - Utility macro that makes it easy to write expressions generic over the different
PValuevariants. - match_
each_ signed_ integer_ ptype - Macro to match over each signed integer type, binding the corresponding native type (from
NativePType) - match_
each_ unsigned_ integer_ ptype - Macro to match over each unsigned integer type, binding the corresponding native type (from
NativePType) - match_
smallest_ offset_ type - Macro to match the smallest offset type for a given value
- require_
child - Require that a child array matches
$M. If the child already matches, returns the same array unchanged. Otherwise, early-returns anExecutionResultrequesting execution of child$idxuntil it matches$M. - require_
opt_ child - Like
require_child!, but for optional children. If the child isNone, this is a no-op. If the child isSomebut does not match$M, early-returns anExecutionResultrequesting execution of child$idx. - require_
patches - Require that patch slots (indices, values, and optionally chunk_offsets) are
Primitive. If no patches are present (slots areNone), this is a no-op. - require_
validity - Require that the validity slot is a
Boolarray. If validity is not array-backed (e.g.NonNullableorAllValid), this is a no-op. If it is array-backed but notBool, early-returns anExecutionResultrequesting execution of the validity slot. - search_
sorted_ conformance_ 3449704996495027372 - Apply #macro_name template to given body
Structs§
- AnyCanonical
- A matcher for any canonical array type.
- AnyColumnar
- Array
- A typed owned handle to an array.
- Array
Parts - Construction parameters for typed arrays.
- Array
Ref - A reference-counted pointer to a type-erased array.
- Array
View - A lightweight,
Copy-able typed view into anArrayRef. - Canonical
Validity - Recursively execute the array until it reaches canonical form along with its validity.
- Depth
First Array Iterator - A depth-first pre-order iterator over an Array.
- Empty
Array Data - Empty array metadata struct for encodings with no per-array metadata.
- Empty
Metadata - Empty array metadata
- Execution
Ctx - Execution context for batch CPU compute.
- Execution
Result - The result of a single execution step on an array encoding.
- Mask
Future - A future that resolves to a mask.
- NotSupported
- Placeholder type used to indicate when a particular vtable is not supported by the encoding.
- Prost
Metadata - A utility wrapper for Prost metadata serialization.
- RawMetadata
- A utility wrapper for raw metadata serialization. This delegates the serialiation step to the arrays’ vtable.
- Recursive
Canonical - Recursively execute the array until all of its children are canonical.
- ValidityV
Table From Child - An implementation of the
ValidityVTablefor arrays that delegate validity entirely to a child array. - ValidityV
Table From Child Slice Helper - An implementation of the
ValidityVTablefor arrays that hold an unsliced validity and a slice into it.
Enums§
- Canonical
- An enum capturing the default uncompressed encodings for each Vortex type.
- Canonical
View - A view into a canonical array type.
- Columnar
- Represents a columnnar array of data, either in canonical form or as a constant array.
- Columnar
View - Execution
Step - Metadata-only step indicator returned alongside an array in
ExecutionResult. - Precision
- The precision level for structural equality and hashing of arrays.
Statics§
Traits§
- ArrayEq
- An equality trait for arrays that represents structural equality with a configurable level of precision. This trait is used primarily to implement common subtree elimination and other array-based caching mechanisms.
- Array
Hash - A hash trait for arrays that represents structural equality with a configurable level of precision. This trait is used primarily to implement common subtree elimination and other array-based caching mechanisms.
- Array
Plugin - Registry trait for ID-based deserialization of arrays.
- ArrayV
Table - Alias for migration — downstream code can start using
ArrayVTable. The arrayVTableencapsulates logic for an Array type within Vortex. - Deserialize
Metadata - Trait for deserializing Vortex metadata from a vector of unaligned bytes.
- DynArray
Eq - A dynamic version of
ArrayEq. - DynArray
Hash - A dynamic version of
ArrayHash. - Executable
- Marker trait for types that an
ArrayRefcan be executed into. - Into
Array - Trait for converting a type into a Vortex
ArrayRef. - OperationsV
Table - Serialize
Metadata - Trait for serializing Vortex metadata to a vector of unaligned bytes.
- ToCanonical
- Trait for types that can be converted from an owned type into an owned array variant.
- Typed
Array Ref - Shared bound for helpers that should work over both owned
Array<V>and borrowedArrayView<V>. - VTable
- The array
VTableencapsulates logic for an Array type within Vortex. - Validity
Child - Validity
Child Slice Helper - ValidityV
Table - Vortex
Session Execute - Extension trait for creating an execution context from a session.
Functions§
- child_
to_ validity - Reconstruct a
Validityfrom an optional child array and nullability. - patches_
child - Returns the child at the given index within a patches component.
- patches_
child_ name - Returns the name of the child at the given index within a patches component.
- patches_
nchildren - Returns the number of children produced by patches.
- validity_
nchildren - Returns 1 if validity produces a child, 0 otherwise.
- validity_
to_ child - Returns the validity as a child array if it produces one.
Type Aliases§
- Array
Context - ArrayId
- ArrayId is a globally unique name for the array’s vtable.
- Array
Plugin Ref - Reference-counted array plugin.
- Done
Predicate - A predicate that determines when an array has reached a desired form during execution.
Attribute Macros§
- array_
slots - Generate slot index constants, a borrowed view struct, and a typed ext trait from a slot struct definition.