pub struct SkewJoinRule { /* private fields */ }Expand description
AQE rule that splits hot partitions of a HashJoin’s probe side using salting, and replicates the build side accordingly.
Supports both static salting (fixed factor) and adaptive salting where the
factor scales with the severity of the skew — more skewed partitions get
more sub-partitions. The adaptive mode uses:
factor = min(max_factor, ceil(rows / (threshold * median))).
Implementations§
Source§impl SkewJoinRule
impl SkewJoinRule
Sourcepub fn new(threshold: f64, factor: u32) -> Self
pub fn new(threshold: f64, factor: u32) -> Self
Create a rule that flags partitions exceeding threshold × median.
Sourcepub fn with_default_factor(threshold: f64) -> Self
pub fn with_default_factor(threshold: f64) -> Self
Like new but with the DEFAULT_SALT_FACTOR.
Sourcepub fn with_adaptive_salty(self, max_factor: u32) -> Self
pub fn with_adaptive_salty(self, max_factor: u32) -> Self
Enable adaptive salting: the factor scales with skew severity up to
max_factor. When max_factor is 0, static salting is used.
Sourcepub fn detect_hot_partitions(&self, stats: &[RuntimeStats]) -> Vec<usize>
pub fn detect_hot_partitions(&self, stats: &[RuntimeStats]) -> Vec<usize>
Detect hot partitions from runtime stats.
Trait Implementations§
Source§impl AqeRule for SkewJoinRule
impl AqeRule for SkewJoinRule
Source§fn apply(
&self,
plan: &PhysicalPlan,
stats: &[RuntimeStats],
) -> Option<PhysicalPlan>
fn apply( &self, plan: &PhysicalPlan, stats: &[RuntimeStats], ) -> Option<PhysicalPlan>
Apply the AQE rule given collected
RuntimeStats for each stage. Read moreAuto Trait Implementations§
impl Freeze for SkewJoinRule
impl RefUnwindSafe for SkewJoinRule
impl Send for SkewJoinRule
impl Sync for SkewJoinRule
impl Unpin for SkewJoinRule
impl UnsafeUnpin for SkewJoinRule
impl UnwindSafe for SkewJoinRule
Blanket Implementations§
impl<T> Allocation for T
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request