Trait vortex_array::IntoCanonical

source ·
pub trait IntoCanonical {
    // Required method
    fn into_canonical(self) -> VortexResult<Canonical>;

    // Provided method
    fn into_arrow(self) -> VortexResult<ArrayRef>
       where Self: Sized { ... }
}
Expand description

Support trait for transmuting an array into the canonical encoding for its [vortex_dtype::DType].

This conversion ensures that the array’s encoding matches one of the builtin canonical encodings, each of which has a corresponding Canonical variant.

§Invariants

The DType of the array will be unchanged by canonicalization.

Required Methods§

source

fn into_canonical(self) -> VortexResult<Canonical>

Provided Methods§

source

fn into_arrow(self) -> VortexResult<ArrayRef>
where Self: Sized,

Implementors§

source§

impl IntoCanonical for BoolArray

source§

impl IntoCanonical for ChunkedArray

source§

impl IntoCanonical for ConstantArray

source§

impl IntoCanonical for ExtensionArray

source§

impl IntoCanonical for ListArray

source§

impl IntoCanonical for NullArray

source§

impl IntoCanonical for PrimitiveArray

source§

impl IntoCanonical for SparseArray

source§

impl IntoCanonical for StructArray

source§

impl IntoCanonical for VarBinArray

source§

impl IntoCanonical for VarBinViewArray

source§

impl IntoCanonical for ArrayData

IntoCanonical implementation for Array.

Canonicalizing an array requires potentially decompressing, so this requires a roundtrip through the array’s internal codec.