pub struct StreamingAqeGuard;Expand description
Guards streaming plans from AQE rules that would change partition count.
Stateful streaming stages use keyed-distribution routing: the same key must always map to the same executor task for the entire job lifetime. AQE coalescing and repartitioning would change the partition count mid-job, orphaning all in-flight state.
Place this rule first in any AQE pipeline that includes coalescing or
repartitioning rules. When the plan carries ExecutionKind::Streaming,
all subsequent AQE rules that affect partitioning must be skipped.
Usage:
use krishiv_plan::optimizer::{AqeOptimizer, CoalesceRule, StreamingAqeGuard};
let mut aqe = AqeOptimizer::new();
aqe.add_guarded_rule(Box::new(CoalesceRule::new(64 * 1024 * 1024)));Implementations§
Source§impl StreamingAqeGuard
impl StreamingAqeGuard
Sourcepub fn plan_is_streaming(plan: &PhysicalPlan) -> bool
pub fn plan_is_streaming(plan: &PhysicalPlan) -> bool
Returns true if the plan contains any streaming node that must not be
subject to AQE partition-count changes.
P3.18: Walk the plan tree recursively so that hybrid batch/streaming
plans are also detected. A plan is considered streaming if either its
top-level ExecutionKind is Streaming or any of its nodes carries
ExecutionKind::Streaming.
Auto Trait Implementations§
impl Freeze for StreamingAqeGuard
impl RefUnwindSafe for StreamingAqeGuard
impl Send for StreamingAqeGuard
impl Sync for StreamingAqeGuard
impl Unpin for StreamingAqeGuard
impl UnsafeUnpin for StreamingAqeGuard
impl UnwindSafe for StreamingAqeGuard
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
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> ⓘ
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> ⓘ
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>
T in a tonic::Request