datafusion_physical_plan::joins::utils

Trait JoinHashMapType

Source
pub trait JoinHashMapType {
    type NextType: IndexMut<usize, Output = u64>;

    // Required methods
    fn extend_zero(&mut self, len: usize);
    fn get_mut(&mut self) -> (&mut RawTable<(u64, u64)>, &mut Self::NextType);
    fn get_map(&self) -> &RawTable<(u64, u64)>;
    fn get_list(&self) -> &Self::NextType;

    // Provided methods
    fn update_from_iter<'a>(
        &mut self,
        iter: impl Iterator<Item = (usize, &'a u64)>,
        deleted_offset: usize,
    ) { ... }
    fn get_matched_indices<'a>(
        &self,
        iter: impl Iterator<Item = (usize, &'a u64)>,
        deleted_offset: Option<usize>,
    ) -> (Vec<u32>, Vec<u64>) { ... }
    fn get_matched_indices_with_limit_offset(
        &self,
        hash_values: &[u64],
        deleted_offset: Option<usize>,
        limit: usize,
        offset: (usize, Option<u64>),
    ) -> (Vec<u32>, Vec<u64>, Option<(usize, Option<u64>)>) { ... }
}

Required Associated Types§

Source

type NextType: IndexMut<usize, Output = u64>

The type of list used to store the next list

Required Methods§

Source

fn extend_zero(&mut self, len: usize)

Extend with zero

Source

fn get_mut(&mut self) -> (&mut RawTable<(u64, u64)>, &mut Self::NextType)

Returns mutable references to the hash map and the next.

Source

fn get_map(&self) -> &RawTable<(u64, u64)>

Returns a reference to the hash map.

Source

fn get_list(&self) -> &Self::NextType

Returns a reference to the next.

Provided Methods§

Source

fn update_from_iter<'a>( &mut self, iter: impl Iterator<Item = (usize, &'a u64)>, deleted_offset: usize, )

Updates hashmap from iterator of row indices & row hashes pairs.

Source

fn get_matched_indices<'a>( &self, iter: impl Iterator<Item = (usize, &'a u64)>, deleted_offset: Option<usize>, ) -> (Vec<u32>, Vec<u64>)

Returns all pairs of row indices matched by hash.

This method only compares hashes, so additional further check for actual values equality may be required.

Source

fn get_matched_indices_with_limit_offset( &self, hash_values: &[u64], deleted_offset: Option<usize>, limit: usize, offset: (usize, Option<u64>), ) -> (Vec<u32>, Vec<u64>, Option<(usize, Option<u64>)>)

Matches hashes with taking limit and offset into account. Returns pairs of matched indices along with the starting point for next matching iteration (None if limit has not been reached).

This method only compares hashes, so additional further check for actual values equality may be required.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl JoinHashMapType for JoinHashMap

Implementation of JoinHashMapType for JoinHashMap.