pub struct JoinHashState { /* private fields */ }Expand description
Immutable build-side state shared by every probe consumer of one physical JOIN edge.
The row batch, key layout and hash table travel as one object. This makes it impossible to attach a pre-built table to a different row ordering or a different set of key columns, while cheap clones let a fused physical pipeline reuse the same build state without rebuilding it.
Implementations§
Source§impl JoinHashState
impl JoinHashState
Sourcepub fn build(build_rows: CompactArc<Vec<Row>>, key_indices: &[usize]) -> Self
pub fn build(build_rows: CompactArc<Vec<Row>>, key_indices: &[usize]) -> Self
Build one immutable hash state for an already materialized physical batch. No row is copied: the state retains the exact batch identity.
Sourcepub fn try_build(
build_rows: CompactArc<Vec<Row>>,
key_indices: &[usize],
max_bytes: usize,
) -> Option<Self>
pub fn try_build( build_rows: CompactArc<Vec<Row>>, key_indices: &[usize], max_bytes: usize, ) -> Option<Self>
Build only when the immutable bucket/entry state fits its admission
budget. None selects the bounded scan fallback rather than risking an
allocator abort or process OOM.
Sourcepub fn build_with_bloom(
build_rows: CompactArc<Vec<Row>>,
key_indices: &[usize],
observer: &mut impl JoinHashObserver,
) -> Self
pub fn build_with_bloom( build_rows: CompactArc<Vec<Row>>, key_indices: &[usize], observer: &mut impl JoinHashObserver, ) -> Self
Build one state while populating a bloom accelerator in the same pass. Keeping this constructor here prevents callers from pairing a table built for one key layout with metadata claiming another layout.
Sourcepub fn matches(
&self,
build_rows: &CompactArc<Vec<Row>>,
key_indices: &[usize],
) -> bool
pub fn matches( &self, build_rows: &CompactArc<Vec<Row>>, key_indices: &[usize], ) -> bool
Whether this state belongs to exactly this immutable batch and key layout. Pointer identity is intentional: equal values in a newly materialized batch do not prove equal physical row indices.
pub fn build_rows(&self) -> &CompactArc<Vec<Row>>
pub fn table(&self) -> &Arc<JoinHashTable> ⓘ
Trait Implementations§
Source§impl Clone for JoinHashState
impl Clone for JoinHashState
Source§fn clone(&self) -> JoinHashState
fn clone(&self) -> JoinHashState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more