ColumnGroupAffinity

Struct ColumnGroupAffinity 

Source
pub struct ColumnGroupAffinity {
    pub type_groups: HashMap<ColumnType, Vec<ColumnId>>,
    pub access_frequency: HashMap<ColumnId, u64>,
    pub null_density: HashMap<ColumnId, f64>,
}
Expand description

Column group affinity for compression optimization

Groups columns by:

  1. Type compatibility (all Int64 together for SIMD)
  2. Access correlation (co-accessed columns together)
  3. Null density (sparse columns separate)

Fields§

§type_groups: HashMap<ColumnType, Vec<ColumnId>>

Columns grouped by type for SIMD optimization

§access_frequency: HashMap<ColumnId, u64>

Access frequency per column (for hot/cold separation)

§null_density: HashMap<ColumnId, f64>

Null density per column (0.0 = never null, 1.0 = always null)

Implementations§

Source§

impl ColumnGroupAffinity

Source

pub fn from_trie(trie: &PathTrie) -> Self

Create from a path trie

Source

pub fn record_access(&mut self, column_id: ColumnId)

Record a column access (for access correlation)

Source

pub fn update_null_density( &mut self, column_id: ColumnId, null_count: u64, total_count: u64, )

Update null density for a column

Source

pub fn simd_groups(&self) -> Vec<(ColumnType, Vec<ColumnId>)>

Get columns suitable for SIMD processing (fixed-size, same type)

Source

pub fn sparse_columns(&self, threshold: f64) -> Vec<ColumnId>

Get sparse columns (null_density > threshold)

Source

pub fn hot_columns(&self, n: usize) -> Vec<ColumnId>

Get hot columns (top N by access frequency)

Trait Implementations§

Source§

impl Clone for ColumnGroupAffinity

Source§

fn clone(&self) -> ColumnGroupAffinity

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ColumnGroupAffinity

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.