pub enum DynamicFilterTracking {
Static,
AllComplete,
Watching(DynamicFilterTracker),
}Expand description
Classification of a predicate according to the dynamic filters it contains.
Produced by DynamicFilterTracking::classify with a single tree walk so
callers can answer both “is it worth pruning at all?” and “do I need to keep
watching?” without traversing the predicate twice.
Variants§
Static
The predicate contains no DynamicFilterPhysicalExpr at all. It is
fully static and will never change.
AllComplete
The predicate contains one or more dynamic filters, but all of them have already been marked complete. Their current values may differ from what was known at planning time (so a one-shot prune is still worthwhile), but they will not change again — there is nothing to watch.
Watching(DynamicFilterTracker)
The predicate contains at least one dynamic filter that can still change.
The embedded DynamicFilterTracker should be polled to detect updates.
Implementations§
Source§impl DynamicFilterTracking
impl DynamicFilterTracking
Sourcepub fn classify(predicate: &Arc<dyn PhysicalExpr>) -> Self
pub fn classify(predicate: &Arc<dyn PhysicalExpr>) -> Self
Walk predicate once and classify its dynamic-filter content,
subscribing to every filter that is not yet complete.
Sourcepub fn contains_dynamic_filter(&self) -> bool
pub fn contains_dynamic_filter(&self) -> bool
true if the predicate contains any dynamic filter (complete or not),
i.e. its value may differ from what was known at planning time and is
therefore worth re-evaluating at least once.
Sourcepub fn watcher(&mut self) -> Option<&mut DynamicFilterTracker>
pub fn watcher(&mut self) -> Option<&mut DynamicFilterTracker>
Mutable access to the underlying tracker when there is still something to watch.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DynamicFilterTracking
impl RefUnwindSafe for DynamicFilterTracking
impl Send for DynamicFilterTracking
impl Sync for DynamicFilterTracking
impl Unpin for DynamicFilterTracking
impl UnsafeUnpin for DynamicFilterTracking
impl UnwindSafe for DynamicFilterTracking
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
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 more