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§
Sourcefn get_array_memory_size(&self) -> usize
fn get_array_memory_size(&self) -> usize
Get the memory size of the Liquid array.
Sourcefn to_arrow_array(&self) -> Result<ArrayRef, IoRange>
fn to_arrow_array(&self) -> Result<ArrayRef, IoRange>
Convert the Liquid array to an Arrow array.
Sourcefn data_type(&self) -> LiquidDataType
fn data_type(&self) -> LiquidDataType
Get the logical data type of the Liquid array.
Sourcefn original_arrow_data_type(&self) -> DataType
fn original_arrow_data_type(&self) -> DataType
Get the original arrow data type of the Liquid hybrid array.
Sourcefn filter(
&self,
selection: &BooleanBuffer,
) -> Result<LiquidHybridArrayRef, IoRange>
fn filter( &self, selection: &BooleanBuffer, ) -> Result<LiquidHybridArrayRef, IoRange>
Filter the Liquid array with a boolean buffer.
Sourcefn soak(&self, data: Bytes) -> LiquidArrayRef
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.
Provided Methods§
Sourcefn to_best_arrow_array(&self) -> Result<ArrayRef, IoRange>
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.
Sourcefn filter_to_arrow(
&self,
selection: &BooleanBuffer,
) -> Result<ArrayRef, IoRange>
fn filter_to_arrow( &self, selection: &BooleanBuffer, ) -> Result<ArrayRef, IoRange>
Filter the Liquid array with a boolean array and return an arrow array.
Sourcefn try_eval_predicate(
&self,
_predicate: &Arc<dyn PhysicalExpr>,
_filter: &BooleanBuffer,
) -> Result<Option<BooleanArray>, IoRange>
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".