Struct transform::Optimizer [−][src]
Expand description
A naive optimizer for relation expressions.
The optimizer currently applies only peep-hole optimizations, from a limited set that were sufficient to get some of TPC-H up and working. It is worth a review at some point to improve the quality, coverage, and architecture of the optimizations.
Fields
transforms: Vec<Box<dyn Transform>>
The list of transforms to apply to an input relation.
Implementations
Builds a logical optimizer that only performs logical transformations.
Builds a physical optimizer.
Performs logical transformations followed by all physical ones. This is meant to be used for optimizing each view within a dataflow once view inlining has already happened, right before dataflow rendering.
Contains the logical optimizations that should run after cross-view transformations run.
pub fn optimize(
&mut self,
relation: MirRelationExpr
) -> Result<OptimizedMirRelationExpr, TransformError>
pub fn optimize(
&mut self,
relation: MirRelationExpr
) -> Result<OptimizedMirRelationExpr, TransformError>
Optimizes the supplied relation expression.
These optimizations are performed with no information about available arrangements, which makes them suitable for pre-optimization before dataflow deployment.
pub(crate) fn transform(
&self,
relation: &mut MirRelationExpr,
indexes: &HashMap<GlobalId, Vec<(GlobalId, Vec<MirScalarExpr>)>>
) -> Result<(), TransformError>
pub(crate) fn transform(
&self,
relation: &mut MirRelationExpr,
indexes: &HashMap<GlobalId, Vec<(GlobalId, Vec<MirScalarExpr>)>>
) -> Result<(), TransformError>
Optimizes the supplied relation expression in place, using available arrangements.
This method should only be called with non-empty indexes
when optimizing a dataflow,
as the optimizations may lock in the use of arrangements that may cease to exist.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Optimizer
impl !UnwindSafe for Optimizer
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more