pub fn optimize_dataflow(
    dataflow: &mut DataflowDesc,
    indexes: &HashMap<GlobalId, Vec<(GlobalId, Vec<MirScalarExpr>)>>,
) -> Result<(), TransformError> {
    // Inline views that are used in only one other view.
    inline_views(dataflow)?;

    // Logical optimization pass after view inlining
    optimize_dataflow_relations(dataflow, indexes, &Optimizer::logical_optimizer())?;

    optimize_dataflow_filters(dataflow)?;
    // TODO: when the linear operator contract ensures that propagated
    // predicates are always applied, projections and filters can be removed
    // from where they come from. Once projections and filters can be removed,
    // TODO: it would be useful for demand to be optimized after filters
    // that way demand only includes the columns that are still necessary after
    // the filters are applied.
    optimize_dataflow_demand(dataflow)?;

    // A smaller logical optimization pass after projections and filters are
    // pushed down across views.
    optimize_dataflow_relations(dataflow, indexes, &Optimizer::logical_cleanup_pass())?;

    // Physical optimization pass
    optimize_dataflow_relations(dataflow, indexes, &Optimizer::physical_optimizer())?;

    optimize_dataflow_monotonic(dataflow)?;

    Ok(())
}
/// Optimizes the implementation of each dataflow.
///
/// Inlines views, performs a full optimization pass including physical
/// planning using the supplied indexes, propagates filtering and projection
/// information to dataflow sources and lifts monotonicity information.
Optimizes the implementation of each dataflow.
Inlines views, performs a full optimization pass including physical
planning using the supplied indexes, propagates filtering and projection
information to dataflow sources and lifts monotonicity information.
Optimizes the implementation of each dataflow . Inlines views performs a full optimization pass including physical planning using the supplied indexes propagates filtering and projection information to dataflow sources and lifts monotonicity information .
pub fn optimize_dataflow(
    dataflow: &mut DataflowDesc,
    indexes: &HashMap<GlobalId, Vec<(GlobalId, Vec<MirScalarExpr>)>>,
) -> Result<(), TransformError> {
    // Inline views that are used in only one other view.
    inline_views(dataflow)?;
    // Logical optimization pass after view inlining
    optimize_dataflow_relations(dataflow, indexes, &Optimizer::logical_optimizer())?;
    optimize_dataflow_filters(dataflow)?;
    // TODO: when the linear operator contract ensures that propagated
    // predicates are always applied, projections and filters can be removed
    // from where they come from. Once projections and filters can be removed,
    // TODO: it would be useful for demand to be optimized after filters
    // that way demand only includes the columns that are still necessary after
    // the filters are applied.
    optimize_dataflow_demand(dataflow)?;
    // A smaller logical optimization pass after projections and filters are
    // pushed down across views.
    optimize_dataflow_relations(dataflow, indexes, &Optimizer::logical_cleanup_pass())?;
    // Physical optimization pass
    optimize_dataflow_relations(dataflow, indexes, &Optimizer::physical_optimizer())?;
    optimize_dataflow_monotonic(dataflow)?;
    Ok(())
}
pub fn optimize_dataflow ( dataflow : & mut DataflowDesc , indexes : & HashMap < GlobalId , Vec < ( GlobalId , Vec < MirScalarExpr > ) > > , ) -> Result < ( ) , TransformError > { // Inline views that are used in only one other view. inline_views ( dataflow ) ? ; // Logical optimization pass after view inlining optimize_dataflow_relations ( dataflow , indexes , & Optimizer :: logical_optimizer ( ) ) ? ; optimize_dataflow_filters ( dataflow ) ? ; // TODO: when the linear operator contract ensures that propagated // predicates are always applied, projections and filters can be removed // from where they come from. Once projections and filters can be removed, // TODO: it would be useful for demand to be optimized after filters // that way demand only includes the columns that are still necessary after // the filters are applied. optimize_dataflow_demand ( dataflow ) ? ; // A smaller logical optimization pass after projections and filters are // pushed down across views. optimize_dataflow_relations ( dataflow , indexes , & Optimizer :: logical_cleanup_pass ( ) ) ? ; // Physical optimization pass optimize_dataflow_relations ( dataflow , indexes , & Optimizer :: physical_optimizer ( ) ) ? ; optimize_dataflow_monotonic ( dataflow ) ? ; Ok ( ( ) ) }
Optimizes the implementation of each dataflow.
Optimizes the implementation of each dataflow .
dataflow
&mut DataflowDesc
indexes
&HashMap<GlobalId, Vec<(GlobalId, Vec<MirScalarExpr>)>>
dataflow
&mut DataflowDesc
indexes
&HashMap<GlobalId, Vec<(GlobalId, Vec<MirScalarExpr>)>>