pub fn extract_from_expression(expr: &MirRelationExpr) -> (Self, &MirRelationExpr) {
        // TODO: This could become iterative rather than recursive if
        // we were able to fuse MFP operators from below, rather than
        // from above.
        match expr {
            MirRelationExpr::Map { input, scalars } => {
                let (mfp, expr) = Self::extract_from_expression(input);
                (mfp.map(scalars.iter().cloned()), expr)
            }
            MirRelationExpr::Filter { input, predicates } => {
                let (mfp, expr) = Self::extract_from_expression(input);
                (mfp.filter(predicates.iter().cloned()), expr)
            }
            MirRelationExpr::Project { input, outputs } => {
                let (mfp, expr) = Self::extract_from_expression(input);
                (mfp.project(outputs.iter().cloned()), expr)
            }
            x => (Self::new(x.arity()), x),
        }
    }
/// Extracts any MapFilterProject at the root of the expression.
///
/// The expression will be modified to extract any maps, filters, and
/// projections, which will be return as `Self`. If there are no maps,
/// filters, or projections the method will return an identity operator.
///
/// The extracted expressions may contain temporal predicates, and one
/// should be careful to apply them blindly.
Extracts any MapFilterProject at the root of the expression.
The expression will be modified to extract any maps, filters, and
projections, which will be return as `Self`. If there are no maps,
filters, or projections the method will return an identity operator.

The extracted expressions may contain temporal predicates, and one
should be careful to apply them blindly.
Extracts any MapFilterProject at the root of the expression . The expression will be modified to extract any maps filters and projections which will be return as ` Self ` . If there are no maps filters or projections the method will return an identity operator . The extracted expressions may contain temporal predicates and one should be careful to apply them blindly .
pub fn extract_from_expression(expr: &MirRelationExpr) -> (Self, &MirRelationExpr) {
        // TODO: This could become iterative rather than recursive if
        // we were able to fuse MFP operators from below, rather than
        // from above.
        match expr {
            MirRelationExpr::Map { input, scalars } => {
                let (mfp, expr) = Self::extract_from_expression(input);
                (mfp.map(scalars.iter().cloned()), expr)
            }
            MirRelationExpr::Filter { input, predicates } => {
                let (mfp, expr) = Self::extract_from_expression(input);
                (mfp.filter(predicates.iter().cloned()), expr)
            }
            MirRelationExpr::Project { input, outputs } => {
                let (mfp, expr) = Self::extract_from_expression(input);
                (mfp.project(outputs.iter().cloned()), expr)
            }
            x => (Self::new(x.arity()), x),
        }
    }
pub fn extract_from_expression ( expr : & MirRelationExpr ) -> ( Self , & MirRelationExpr ) { // TODO: This could become iterative rather than recursive if // we were able to fuse MFP operators from below, rather than // from above. match expr { MirRelationExpr :: Map { input , scalars } => { let ( mfp , expr ) = Self :: extract_from_expression ( input ) ; ( mfp . map ( scalars . iter ( ) . cloned ( ) ) , expr ) } MirRelationExpr :: Filter { input , predicates } => { let ( mfp , expr ) = Self :: extract_from_expression ( input ) ; ( mfp . filter ( predicates . iter ( ) . cloned ( ) ) , expr ) } MirRelationExpr :: Project { input , outputs } => { let ( mfp , expr ) = Self :: extract_from_expression ( input ) ; ( mfp . project ( outputs . iter ( ) . cloned ( ) ) , expr ) } x => ( Self :: new ( x . arity ( ) ) , x ) , } }
Extracts any MapFilterProject at the root of the expression.
Extracts any MapFilterProject at the root of the expression .
expr
&MirRelationExpr
expr
&MirRelationExpr