vortex_array

Trait IntoCanonical

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

    // Provided methods
    fn into_arrow(self) -> VortexResult<ArrayRef>
       where Self: Sized { ... }
    fn into_arrow_with_data_type(
        self,
        data_type: &DataType,
    ) -> 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§

Provided Methods§

Source

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

Source

fn into_arrow_with_data_type( self, data_type: &DataType, ) -> 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.