Skip to main content

LiquidHybridArray

Trait LiquidHybridArray 

Source
pub trait LiquidHybridArray:
    Debug
    + Send
    + Sync {
Show 14 methods // Required methods fn as_any(&self) -> &dyn Any; fn get_array_memory_size(&self) -> usize; fn len(&self) -> usize; fn to_arrow_array(&self) -> Result<ArrayRef, IoRange>; fn data_type(&self) -> LiquidDataType; fn original_arrow_data_type(&self) -> DataType; fn to_bytes(&self) -> Result<Vec<u8>, IoRange>; fn filter( &self, selection: &BooleanBuffer, ) -> Result<LiquidHybridArrayRef, IoRange>; fn soak(&self, data: Bytes) -> LiquidArrayRef; fn to_liquid(&self) -> IoRange; // Provided methods fn is_empty(&self) -> bool { ... } fn to_best_arrow_array(&self) -> Result<ArrayRef, IoRange> { ... } fn filter_to_arrow( &self, selection: &BooleanBuffer, ) -> Result<ArrayRef, IoRange> { ... } fn try_eval_predicate( &self, _predicate: &Arc<dyn PhysicalExpr>, _filter: &BooleanBuffer, ) -> Result<Option<BooleanArray>, IoRange> { ... }
}
Expand description

A Liquid hybrid array is a Liquid array that part of its data is stored on disk. LiquidHybridArray is more complex than in-memory LiquidArray because it needs to handle IO.

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Get the underlying any type.

Source

fn get_array_memory_size(&self) -> usize

Get the memory size of the Liquid array.

Source

fn len(&self) -> usize

Get the length of the Liquid array.

Source

fn to_arrow_array(&self) -> Result<ArrayRef, IoRange>

Convert the Liquid array to an Arrow array.

Source

fn data_type(&self) -> LiquidDataType

Get the logical data type of the Liquid array.

Source

fn original_arrow_data_type(&self) -> DataType

Get the original arrow data type of the Liquid hybrid array.

Source

fn to_bytes(&self) -> Result<Vec<u8>, IoRange>

Serialize the Liquid array to a byte array.

Source

fn filter( &self, selection: &BooleanBuffer, ) -> Result<LiquidHybridArrayRef, IoRange>

Filter the Liquid array with a boolean buffer.

Source

fn soak(&self, data: Bytes) -> LiquidArrayRef

Feed IO data to the LiquidHybridArray and return the in-memory LiquidArray. For byte-view arrays, data should be the raw FSST buffer bytes.

Source

fn to_liquid(&self) -> IoRange

Get the IoRange to convert the LiquidHybridArray to a LiquidArray.

Provided Methods§

Source

fn is_empty(&self) -> bool

Check if the Liquid array is empty.

Source

fn to_best_arrow_array(&self) -> Result<ArrayRef, IoRange>

Convert the Liquid array to an Arrow array. Except that it will pick the best encoding for the arrow array. Meaning that it may not obey the data type of the original arrow array.

Source

fn filter_to_arrow( &self, selection: &BooleanBuffer, ) -> Result<ArrayRef, IoRange>

Filter the Liquid array with a boolean array and return an arrow array.

Source

fn try_eval_predicate( &self, _predicate: &Arc<dyn PhysicalExpr>, _filter: &BooleanBuffer, ) -> Result<Option<BooleanArray>, IoRange>

Try to evaluate a predicate on the Liquid array with a filter. Returns Ok(None) if the predicate is not supported.

Note that the filter is a boolean buffer, not a boolean array, i.e., filter can’t be nullable. The returned boolean mask is nullable if the the original array is nullable.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§