vortex_array::stats

Trait Statistics

Source
pub trait Statistics {
    // Required methods
    fn get(&self, stat: Stat) -> Option<Scalar>;
    fn to_set(&self) -> StatsSet;
    fn set(&self, stat: Stat, value: Scalar);
    fn compute(&self, stat: Stat) -> Option<Scalar>;
}

Required Methods§

Source

fn get(&self, stat: Stat) -> Option<Scalar>

Returns the value of the statistic only if it’s present

Source

fn to_set(&self) -> StatsSet

Get all existing statistics

Source

fn set(&self, stat: Stat, value: Scalar)

Source

fn compute(&self, stat: Stat) -> Option<Scalar>

Computes the value of the stat if it’s not present

Implementations§

Source§

impl dyn Statistics + '_

Source

pub fn get_as<U: for<'a> TryFrom<&'a Scalar, Error = VortexError>>( &self, stat: Stat, ) -> Option<U>

Source

pub fn get_as_cast<U: NativePType + for<'a> TryFrom<&'a Scalar, Error = VortexError>>( &self, stat: Stat, ) -> Option<U>

Source

pub fn compute_as<U: for<'a> TryFrom<&'a Scalar, Error = VortexError>>( &self, stat: Stat, ) -> Option<U>

Source

pub fn compute_as_cast<U: NativePType + for<'a> TryFrom<&'a Scalar, Error = VortexError>>( &self, stat: Stat, ) -> Option<U>

Source

pub fn compute_min<U: for<'a> TryFrom<&'a Scalar, Error = VortexError>>( &self, ) -> Option<U>

Source

pub fn compute_max<U: for<'a> TryFrom<&'a Scalar, Error = VortexError>>( &self, ) -> Option<U>

Source

pub fn compute_is_strict_sorted(&self) -> Option<bool>

Source

pub fn compute_is_sorted(&self) -> Option<bool>

Source

pub fn compute_is_constant(&self) -> Option<bool>

Source

pub fn compute_true_count(&self) -> Option<usize>

Source

pub fn compute_null_count(&self) -> Option<usize>

Source

pub fn compute_run_count(&self) -> Option<usize>

Source

pub fn compute_bit_width_freq(&self) -> Option<Vec<usize>>

Source

pub fn compute_trailing_zero_freq(&self) -> Option<Vec<usize>>

Trait Implementations§

Source§

impl WriteFlatBuffer for &dyn Statistics

Source§

type Target<'t> = ArrayStats<'t>

Source§

fn write_flatbuffer<'fb>( &self, fbb: &mut FlatBufferBuilder<'fb>, ) -> WIPOffset<Self::Target<'fb>>

Implementors§