pub trait ToArrowType {
// Required methods
fn to_arrow_schema(&self) -> VortexResult<Schema>;
fn to_arrow_dtype(&self) -> VortexResult<DataType>;
}Expand description
Required Methods§
Sourcefn to_arrow_schema(&self) -> VortexResult<Schema>
fn to_arrow_schema(&self) -> VortexResult<Schema>
Convert a Vortex DType into an Arrow Schema.
Prefer ArrowSession::to_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.
Sourcefn to_arrow_dtype(&self) -> VortexResult<DataType>
👎Deprecated: Use ArrowSession::to_arrow_datatype instead
fn to_arrow_dtype(&self) -> VortexResult<DataType>
Use ArrowSession::to_arrow_datatype instead
Returns the Arrow DataType that best corresponds to this Vortex DType.
Prefer ArrowSession::to_arrow_datatype (or to_arrow_field). 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
impl ToArrowType for DType
fn to_arrow_schema(&self) -> VortexResult<Schema>
Source§fn to_arrow_dtype(&self) -> VortexResult<DataType>
fn to_arrow_dtype(&self) -> VortexResult<DataType>
Use ArrowSession::to_arrow_datatype instead