pub fn add_pushdown_exprs(mut self, filters: &[Expr]) -> Self {
        // For each expression of the filters, recursively split it, if it is is an AND conjunction
        // For example, expression (x AND y) will be split into a vector of 2 expressions [x, y]
        let mut exprs = vec![];
        filters
            .iter()
            .for_each(|expr| Self::split_members(expr, &mut exprs));

        // Only keep single_column and primitive binary expressions
        let mut pushdown_exprs: Vec<Expr> = vec![];
        let exprs_result = exprs
            .into_iter()
            .try_for_each::<_, Result<_, DataFusionError>>(|expr| {
                let mut columns = HashSet::new();
                expr_to_columns(&expr, &mut columns)?;

                if columns.len() == 1 && Self::primitive_binary_expr(&expr) {
                    pushdown_exprs.push(expr);
                }
                Ok(())
            });

        match exprs_result {
            Ok(()) => {
                // Return the builder with only the pushdownable expressions on it.
                self.inner.exprs.append(&mut pushdown_exprs);
            }
            Err(e) => {
                debug!("Error, {}, building push-down predicates for filters: {:#?}. No predicates are pushed down", e, filters);
            }
        }

        self
    }
/// Adds only the expressions from `filters` that can be pushed down to
/// execution engines.
Adds only the expressions from `filters` that can be pushed down to
execution engines.
Adds only the expressions from ` filters ` that can be pushed down to execution engines .
pub fn add_pushdown_exprs(mut self, filters: &[Expr]) -> Self {
        // For each expression of the filters, recursively split it, if it is is an AND conjunction
        // For example, expression (x AND y) will be split into a vector of 2 expressions [x, y]
        let mut exprs = vec![];
        filters
            .iter()
            .for_each(|expr| Self::split_members(expr, &mut exprs));
        // Only keep single_column and primitive binary expressions
        let mut pushdown_exprs: Vec<Expr> = vec![];
        let exprs_result = exprs
            .into_iter()
            .try_for_each::<_, Result<_, DataFusionError>>(|expr| {
                let mut columns = HashSet::new();
                expr_to_columns(&expr, &mut columns)?;
                if columns.len() == 1 && Self::primitive_binary_expr(&expr) {
                    pushdown_exprs.push(expr);
                }
                Ok(())
            });
        match exprs_result {
            Ok(()) => {
                // Return the builder with only the pushdownable expressions on it.
                self.inner.exprs.append(&mut pushdown_exprs);
            }
            Err(e) => {
                debug!("Error, {}, building push-down predicates for filters: {:#?}. No predicates are pushed down", e, filters);
            }
        }
        self
    }
pub fn add_pushdown_exprs ( mut self , filters : & [ Expr ] ) -> Self { // For each expression of the filters, recursively split it, if it is is an AND conjunction // For example, expression (x AND y) will be split into a vector of 2 expressions [x, y] let mut exprs = vec ! [ ] ; filters . iter ( ) . for_each ( | expr | Self :: split_members ( expr , & mut exprs ) ) ; // Only keep single_column and primitive binary expressions let mut pushdown_exprs : Vec < Expr > = vec ! [ ] ; let exprs_result = exprs . into_iter ( ) . try_for_each :: < _ , Result < _ , DataFusionError > > ( | expr | { let mut columns = HashSet :: new ( ) ; expr_to_columns ( & expr , & mut columns ) ? ; if columns . len ( ) == 1 && Self :: primitive_binary_expr ( & expr ) { pushdown_exprs . push ( expr ) ; } Ok ( ( ) ) } ) ; match exprs_result { Ok ( ( ) ) => { // Return the builder with only the pushdownable expressions on it. self . inner . exprs . append ( & mut pushdown_exprs ) ; } Err ( e ) => { debug ! ( " " e filters ) ; } } self }
Adds only the expressions from `filters` that can be pushed down to
execution engines.
Adds only the expressions from ` filters ` that can be pushed down to execution engines .
mut self
filters
&[Expr]
mut self
filters
&[Expr]