pub struct Optimizer { /* private fields */ }Expand description
The plan optimizer: runs a set of rules iteratively until convergence.
Implementations§
Source§impl Optimizer
impl Optimizer
Sourcepub fn default_rules() -> Self
pub fn default_rules() -> Self
Create an optimizer with the default set of rules.
Sourcepub fn with_rules(rules: Vec<Box<dyn OptimizationRule>>) -> Self
pub fn with_rules(rules: Vec<Box<dyn OptimizationRule>>) -> Self
Create an optimizer with a custom set of rules.
Sourcepub fn optimize(&self, plan: LogicalPlan) -> (LogicalPlan, usize)
pub fn optimize(&self, plan: LogicalPlan) -> (LogicalPlan, usize)
Optimize a logical plan by applying rules iteratively.
Returns the optimized plan and the number of passes performed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Optimizer
impl !RefUnwindSafe for Optimizer
impl Send for Optimizer
impl Sync for Optimizer
impl Unpin for Optimizer
impl UnsafeUnpin for Optimizer
impl !UnwindSafe 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