pub struct Optimizer { /* private fields */ }Expand description
Multi-pass rule-based optimizer.
Passes are applied left-to-right in the order they were registered. The
default pipeline is constructed by Optimizer::new.
Implementations§
Source§impl Optimizer
impl Optimizer
Sourcepub fn new() -> Self
pub fn new() -> Self
Build the default five-pass optimizer pipeline.
The ProjectionPruning pass is created with an empty required set,
which means it operates as a no-op unless a caller explicitly builds an
optimizer with a non-empty requirement list via Optimizer::with_passes.
Sourcepub fn with_passes(passes: Vec<Box<dyn OptPass>>) -> Self
pub fn with_passes(passes: Vec<Box<dyn OptPass>>) -> Self
Build an optimizer with a custom ordered list of passes.
Sourcepub fn optimize(&self, plan: LogicalPlan) -> LogicalPlan
pub fn optimize(&self, plan: LogicalPlan) -> LogicalPlan
Run all registered passes over plan in registration order.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Optimizer
impl !UnwindSafe for Optimizer
impl Freeze for Optimizer
impl Send for Optimizer
impl Sync for Optimizer
impl Unpin for Optimizer
impl UnsafeUnpin for Optimizer
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
Mutably borrows from an owned value. Read more