pub fn filter<I>(mut self, predicates: I) -> Self
    where
        I: IntoIterator<Item = MirScalarExpr>,
    {
        for mut predicate in predicates {
            // Correct column references.
            predicate.permute(&self.projection[..]);

            // Validate column references.
            assert!(predicate
                .support()
                .into_iter()
                .all(|c| c < self.input_arity + self.expressions.len()));

            // Insert predicate as eagerly as it can be evaluated:
            // just after the largest column in its support is formed.
            let max_support = predicate
                .support()
                .into_iter()
                .max()
                .map(|c| c + 1)
                .unwrap_or(0);
            self.predicates.push((max_support, predicate))
        }
        // Stable sort predicates by position at which they take effect.
        // We put literal errors at the end as a stop-gap to avoid erroring
        // before we are able to evaluate any predicates that might prevent it.
        self.predicates
            .sort_by_key(|(position, predicate)| (predicate.is_literal_err(), *position));
        self
    }
/// Retain only rows satisfying these predicates.
///
/// This method introduces predicates as eagerly as they can be evaluated,
/// which may not be desired for predicates that may cause exceptions.
/// If fine manipulation is required, the predicates can be added manually.
Retain only rows satisfying these predicates.
This method introduces predicates as eagerly as they can be evaluated,
which may not be desired for predicates that may cause exceptions.
If fine manipulation is required, the predicates can be added manually.
Retain only rows satisfying these predicates . This method introduces predicates as eagerly as they can be evaluated which may not be desired for predicates that may cause exceptions . If fine manipulation is required the predicates can be added manually .
pub fn filter<I>(mut self, predicates: I) -> Self
    where
        I: IntoIterator<Item = MirScalarExpr>,
    {
        for mut predicate in predicates {
            // Correct column references.
            predicate.permute(&self.projection[..]);
            // Validate column references.
            assert!(predicate
                .support()
                .into_iter()
                .all(|c| c < self.input_arity + self.expressions.len()));
            // Insert predicate as eagerly as it can be evaluated:
            // just after the largest column in its support is formed.
            let max_support = predicate
                .support()
                .into_iter()
                .max()
                .map(|c| c + 1)
                .unwrap_or(0);
            self.predicates.push((max_support, predicate))
        }
        // Stable sort predicates by position at which they take effect.
        // We put literal errors at the end as a stop-gap to avoid erroring
        // before we are able to evaluate any predicates that might prevent it.
        self.predicates
            .sort_by_key(|(position, predicate)| (predicate.is_literal_err(), *position));
        self
    }
pub fn filter < I > ( mut self , predicates : I ) -> Self where I : IntoIterator < Item = MirScalarExpr > , { for mut predicate in predicates { // Correct column references. predicate . permute ( & self . projection [ .. ] ) ; // Validate column references. assert ! ( predicate support ( ) into_iter ( ) all ( c c self input_arity self expressions len ( ) ) ) ; // Insert predicate as eagerly as it can be evaluated: // just after the largest column in its support is formed. let max_support = predicate . support ( ) . into_iter ( ) . max ( ) . map ( | c | c + 1 ) . unwrap_or ( 0 ) ; self . predicates . push ( ( max_support , predicate ) ) } // Stable sort predicates by position at which they take effect. // We put literal errors at the end as a stop-gap to avoid erroring // before we are able to evaluate any predicates that might prevent it. self . predicates . sort_by_key ( | ( position , predicate ) | ( predicate . is_literal_err ( ) , * position ) ) ; self }
Retain only rows satisfying these predicates.
Retain only rows satisfying these predicates .
mut self
predicates
I
mut self
predicates
I