Skip to main content

ToArrowType

Trait ToArrowType 

Source
pub trait ToArrowType {
    // Required methods
    fn to_arrow_schema(&self) -> VortexResult<Schema>;
    fn to_arrow_dtype(&self) -> VortexResult<DataType>;
}
๐Ÿ‘ŽDeprecated:

Use ArrowSession::to_arrow_schema / to_arrow_datatype instead

Expand description

Extension trait converting Vortex DTypes into Arrow schemas and data types.

This mirrors inherent methods that lived on DType before Arrow interoperability moved into this crate.

Required Methodsยง

Source

fn to_arrow_schema(&self) -> VortexResult<Schema>

๐Ÿ‘ŽDeprecated:

Use ArrowSession::to_arrow_schema instead

Convert a Vortex DType into an Arrow Schema.

This method is not plugin-aware and strips any ARROW:extension:name metadata for non-builtin extensions (only arrow.parquet.variant is special-cased here). Use the session method when you need round-trippable extension metadata.

Source

fn to_arrow_dtype(&self) -> VortexResult<DataType>

๐Ÿ‘ŽDeprecated:

Use ArrowSession::to_arrow_datatype instead

Returns the Arrow DataType that best corresponds to this Vortex DType.

This method has no awareness of registered Arrow extension plugins, so any DType::Extension outside the builtin temporal set will fail or silently lose its ARROW:extension:name metadata. The session methods recurse through containers and dispatch plugins at every extension node.

Dyn Compatibilityยง

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Typesยง

Sourceยง

impl ToArrowType for DType

Sourceยง

fn to_arrow_schema(&self) -> VortexResult<Schema>

๐Ÿ‘ŽDeprecated:

Use ArrowSession::to_arrow_schema instead

Sourceยง

fn to_arrow_dtype(&self) -> VortexResult<DataType>

๐Ÿ‘ŽDeprecated:

Use ArrowSession::to_arrow_datatype instead

Implementorsยง