pub fn push_filters_through_flat_map(
        predicates: &mut Vec<MirScalarExpr>,
        input_arity: usize,
    ) -> (Vec<MirScalarExpr>, Vec<MirScalarExpr>) {
        let mut pushdown = Vec::new();
        let mut retained = Vec::new();
        for predicate in predicates.drain(..) {
            // First, check if we can push this predicate down. We can do so if and only if:
            // (1) the predicate is not a literal error, and
            // (2) each column it references is from the input.
            if (!predicate.is_literal_err()) && predicate.support().iter().all(|c| *c < input_arity)
            {
                pushdown.push(predicate);
            } else {
                retained.push(predicate);
            }
        }
        (retained, pushdown)
    }
/// Computes "safe" predicate to push through a FlatMap.
///
/// In the case of a Filter { FlatMap {...} }, we want to push through all predicates
/// that (1) are not literal errors and (2) have support exclusively in the columns
/// provided by the FlatMap input.
///
/// Returns the predicates that can be pushed down, followed by ones that cannot.
Computes "safe" predicate to push through a FlatMap.
In the case of a Filter { FlatMap {...} }, we want to push through all predicates
that (1) are not literal errors and (2) have support exclusively in the columns
provided by the FlatMap input.

Returns the predicates that can be pushed down, followed by ones that cannot.
Computes " safe " predicate to push through a FlatMap . In the case of a Filter { FlatMap { ... } } we want to push through all predicates that ( 1 ) are not literal errors and ( 2 ) have support exclusively in the columns provided by the FlatMap input . Returns the predicates that can be pushed down followed by ones that cannot .
pub fn push_filters_through_flat_map(
        predicates: &mut Vec<MirScalarExpr>,
        input_arity: usize,
    ) -> (Vec<MirScalarExpr>, Vec<MirScalarExpr>) {
        let mut pushdown = Vec::new();
        let mut retained = Vec::new();
        for predicate in predicates.drain(..) {
            // First, check if we can push this predicate down. We can do so if and only if:
            // (1) the predicate is not a literal error, and
            // (2) each column it references is from the input.
            if (!predicate.is_literal_err()) && predicate.support().iter().all(|c| *c < input_arity)
            {
                pushdown.push(predicate);
            } else {
                retained.push(predicate);
            }
        }
        (retained, pushdown)
    }
pub fn push_filters_through_flat_map ( predicates : & mut Vec < MirScalarExpr > , input_arity : usize , ) -> ( Vec < MirScalarExpr > , Vec < MirScalarExpr > ) { let mut pushdown = Vec :: new ( ) ; let mut retained = Vec :: new ( ) ; for predicate in predicates . drain ( .. ) { // First, check if we can push this predicate down. We can do so if and only if: // (1) the predicate is not a literal error, and // (2) each column it references is from the input. if ( ! predicate . is_literal_err ( ) ) && predicate . support ( ) . iter ( ) . all ( | c | * c < input_arity ) { pushdown . push ( predicate ) ; } else { retained . push ( predicate ) ; } } ( retained , pushdown ) }
Computes "safe" predicate to push through a FlatMap.
Computes " safe " predicate to push through a FlatMap .
predicates
&mut Vec<MirScalarExpr>
input_arity
usize
predicates
&mut Vec<MirScalarExpr>
input_arity
usize