pub enum JoinStrategy {
Hash,
Broadcast,
Shuffle,
Semi,
SemiScan,
}Expand description
Physical join hint chosen at plan time (Phase 9b executes broadcast/shuffle).
Variants§
Hash
Compute-side hash join (Phase 6 default).
Broadcast
Small build side → broadcast allow-list to storage (Phase 9b).
Shuffle
Both sides large → shuffle by join key (Phase 9b).
Semi
General semi join: build one key set from the right side — a scan or
a subtree — and keep only the left rows whose key is present, emitting
the left columns. This is the umbrella strategy: the Self::SemiScan
special case claims a key-unique scan whose fetch-once verdict chose
the whole read, and the general road builds from whatever the
promotion left, scan or subtree.
Never returned by JoinStrategy::from_cardinalities_and_domains.
SemiScan
Scan-source semi join: the right is a single scan whose fetch_once
verdict already chose the whole read, and the scan is key-unique with
no payload beyond the key. The kernel is
[waratah_exec::SemiJoinSet], the one FILTER EXISTS already uses.
Key-uniqueness is the row-multiplicity proof: a repeated right key
multiplies every left column, and a plain COUNT of a left column
observes that multiplication, so a bag mark on the key alone is not
enough. The cost is the verdict’s build side, never a cardinality
choice. Never returned by
JoinStrategy::from_cardinalities_and_domains.
Implementations§
Source§impl JoinStrategy
impl JoinStrategy
Sourcepub fn from_cardinalities(left: u64, right: u64) -> JoinStrategy
pub fn from_cardinalities(left: u64, right: u64) -> JoinStrategy
Pick a strategy from estimated left/right row counts (no HLL domain).
Sourcepub fn from_cardinalities_and_domains(
left_rows: u64,
right_rows: u64,
left_domain: Option<u64>,
right_domain: Option<u64>,
) -> JoinStrategy
pub fn from_cardinalities_and_domains( left_rows: u64, right_rows: u64, left_domain: Option<u64>, right_domain: Option<u64>, ) -> JoinStrategy
Prefer distinct join-key domains when known; broadcast pushes the key set.
Domain estimates are capped by row counts (min(domain, rows)) so a
selective prior scan cannot be inflated by a global predicate HLL.
Trait Implementations§
Source§impl Clone for JoinStrategy
impl Clone for JoinStrategy
Source§fn clone(&self) -> JoinStrategy
fn clone(&self) -> JoinStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JoinStrategy
impl Debug for JoinStrategy
Source§impl PartialEq for JoinStrategy
impl PartialEq for JoinStrategy
impl Copy for JoinStrategy
impl Eq for JoinStrategy
impl StructuralPartialEq for JoinStrategy
Auto Trait Implementations§
impl Freeze for JoinStrategy
impl RefUnwindSafe for JoinStrategy
impl Send for JoinStrategy
impl Sync for JoinStrategy
impl Unpin for JoinStrategy
impl UnsafeUnpin for JoinStrategy
impl UnwindSafe for JoinStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].