Skip to main content

Crate vortex_arrow

Crate vortex_arrow 

Source
Expand description

Apache Arrow interoperability for Vortex.

This crate owns every conversion between Vortex and Arrow. Exporting a Vortex array to Arrow goes through ExecuteArrowExt, which uses the ArrowSession of its execution context. Every other conversion goes through the ArrowSession itself: importing Arrow schemas, fields, and data types into Vortex (ArrowSession::from_arrow_schema, ArrowSession::from_arrow_field, ArrowSession::from_arrow_datatype), importing Arrow arrays and record batches (ArrowSession::from_arrow_array, ArrowSession::from_arrow_record_batch), and exporting Vortex dtypes to Arrow (ArrowSession::to_arrow_schema, ArrowSession::to_arrow_field, ArrowSession::to_arrow_datatype).

The ArrowSession session variable is created on first use of ArrowSessionExt::arrow, so no explicit registration is required. It can look up the extension types of its Vortex session by their Vortex IDs (see ArrowSession).

ArrowScanExt adapts scan drivers to Arrow record-batch streams, performing conversion on the workers producing the scan batches.

Re-exports§

pub use convert::IntoVortexArray;
pub use convert::nulls;

Modules§

bool
byte_view
convert
Conversions of Arrow arrays into Vortex arrays without import plugins.
dtype
Convert between Vortex vortex_array::dtype::DType and Apache Arrow arrow_schema::DataType.
ext_metadata
Encoding Vortex extension types in Arrow field metadata.
null
primitive
test_harness
Independent Arrow conformance checks and nested transport assertions.

Structs§

ArrowArrayStreamAdapter
An adapter for converting an RecordBatchStreamReader into a Vortex ArrayIterator.
ArrowExportOptions
Typed options propagated to every nested array in an Arrow export.
ArrowSession
Session-scoped registry of Arrow extension plugins.
CompactBuffers
Whether to compact string and binary view buffers during Arrow export.
Datum
A wrapper around a generic Arrow array that can be used as a Datum in Arrow compute.

Enums§

ArrowExport
Outcome of a successful call to ArrowExportVTable::execute_arrow.
ArrowImport
Outcome of a successful call to ArrowImportVTable::from_arrow_array.
ArrowMetadataPolicy
Whether an Arrow representation needs separate Vortex metadata or not to restore the full dtype.

Traits§

ArrowExportVTable
Plugin layer for exporting a Vortex array to an Arrow extension type.
ArrowExtVTable
Native Arrow conversion callbacks for one Vortex extension type.
ArrowImportVTable
Plugin layer for importing an Arrow extension-typed array into a Vortex array.
ArrowScanExt
Arrow record-batch output for a scan driver.
ArrowSessionExt
Extension trait for accessing the ArrowSession on a Vortex session.
ExecuteArrowExt
Execution of a Vortex array into an Arrow array, for every type that implements IntoArray.
IntoArrowField
The Arrow type description of an array being imported by ArrowSession::from_arrow_array.
ToArrowDatum
Convert a Vortex Scalar into an Arrow Datum (a single-element Arrow array).

Functions§

from_arrow_columnar
Convert an Arrow array to an Array with a specific length, using the provided ExecutionCtx.
level_validity
Convert an Arrow null buffer for a container that keeps its storage.
to_arrow_null_buffer
Converts a Validity to an Arrow NullBuffer, executing the validity array if needed.
to_null_buffer
Converts a mask to a null buffer.

Type Aliases§

ArrowExportVTableRef
ArrowImportVTableRef