Struct datafusion_optimizer::optimizer::Optimizer
source · [−]pub struct Optimizer {
pub rules: Vec<Arc<dyn OptimizerRule + Send + Sync>>,
}Expand description
A rule-based optimizer.
Fields
rules: Vec<Arc<dyn OptimizerRule + Send + Sync>>All rules to apply
Implementations
sourceimpl Optimizer
impl Optimizer
sourcepub fn new(rules: Vec<Arc<dyn OptimizerRule + Send + Sync>>) -> Self
pub fn new(rules: Vec<Arc<dyn OptimizerRule + Send + Sync>>) -> Self
Create a new optimizer with the given rules
sourcepub fn optimize<F>(
&self,
plan: &LogicalPlan,
optimizer_config: &OptimizerConfig,
observer: F
) -> Result<LogicalPlan> where
F: FnMut(&LogicalPlan, &dyn OptimizerRule),
pub fn optimize<F>(
&self,
plan: &LogicalPlan,
optimizer_config: &OptimizerConfig,
observer: F
) -> Result<LogicalPlan> where
F: FnMut(&LogicalPlan, &dyn OptimizerRule),
Optimizes the logical plan by applying optimizer rules, and invoking observer function after each call
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Optimizer
impl Send for Optimizer
impl Sync for Optimizer
impl Unpin for Optimizer
impl !UnwindSafe for Optimizer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more