Skip to main content

LiquidSqueezedArray

Trait LiquidSqueezedArray 

Source
pub trait LiquidSqueezedArray:
    Debug
    + Send
    + Sync {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn get_array_memory_size(&self) -> usize;
    fn len(&self) -> usize;
    fn to_arrow_array<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ArrayRef> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn data_type(&self) -> LiquidDataType;
    fn original_arrow_data_type(&self) -> DataType;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn to_best_arrow_array<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ArrayRef> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn filter<'life0, 'life1, 'async_trait>(
        &'life0 self,
        selection: &'life1 BooleanBuffer,
    ) -> Pin<Box<dyn Future<Output = ArrayRef> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn try_eval_predicate<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _predicate: &'life1 Arc<dyn PhysicalExpr>,
        _filter: &'life2 BooleanBuffer,
    ) -> Pin<Box<dyn Future<Output = Option<BooleanArray>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn disk_backing(&self) -> SqueezedBacking { ... }
}
Expand description

A Liquid squeezed array is a Liquid array that part of its data is stored on disk. LiquidSqueezedArray 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<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ArrayRef> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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 squeezed array.

Provided Methods§

Source

fn is_empty(&self) -> bool

Check if the Liquid array is empty.

Source

fn to_best_arrow_array<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ArrayRef> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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<'life0, 'life1, 'async_trait>( &'life0 self, selection: &'life1 BooleanBuffer, ) -> Pin<Box<dyn Future<Output = ArrayRef> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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

Source

fn try_eval_predicate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _predicate: &'life1 Arc<dyn PhysicalExpr>, _filter: &'life2 BooleanBuffer, ) -> Pin<Box<dyn Future<Output = Option<BooleanArray>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

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.

Source

fn disk_backing(&self) -> SqueezedBacking

Describe how the squeezed array persists its backing bytes on disk.

Implementors§