pub fn new(
        input_arity: usize,
        group_key: &[expr::MirScalarExpr],
        aggregates: &[AggregateExpr],
    ) -> Self {
        // Form an operator for evaluating key expressions.
        let mut key_mfp = expr::MapFilterProject::new(input_arity)
            .map(group_key.iter().cloned())
            .project(input_arity..(input_arity + group_key.len()));

        // Form an operator for evaluating value expressions.
        let mut val_mfp = expr::MapFilterProject::new(input_arity)
            .map(aggregates.iter().map(|a| a.expr.clone()))
            .project(input_arity..(input_arity + aggregates.len()));

        key_mfp.optimize();
        let key_plan = key_mfp.into_plan().unwrap().into_nontemporal().unwrap();
        val_mfp.optimize();
        let val_plan = val_mfp.into_plan().unwrap().into_nontemporal().unwrap();

        Self { key_plan, val_plan }
    }
/// Create a new [KeyValPlan] from aggregation arguments.
Create a new [KeyValPlan] from aggregation arguments.
Create a new [ KeyValPlan ] from aggregation arguments .
pub fn new(
        input_arity: usize,
        group_key: &[expr::MirScalarExpr],
        aggregates: &[AggregateExpr],
    ) -> Self {
        // Form an operator for evaluating key expressions.
        let mut key_mfp = expr::MapFilterProject::new(input_arity)
            .map(group_key.iter().cloned())
            .project(input_arity..(input_arity + group_key.len()));
        // Form an operator for evaluating value expressions.
        let mut val_mfp = expr::MapFilterProject::new(input_arity)
            .map(aggregates.iter().map(|a| a.expr.clone()))
            .project(input_arity..(input_arity + aggregates.len()));
        key_mfp.optimize();
        let key_plan = key_mfp.into_plan().unwrap().into_nontemporal().unwrap();
        val_mfp.optimize();
        let val_plan = val_mfp.into_plan().unwrap().into_nontemporal().unwrap();
        Self { key_plan, val_plan }
    }
pub fn new ( input_arity : usize , group_key : & [ expr :: MirScalarExpr ] , aggregates : & [ AggregateExpr ] , ) -> Self { // Form an operator for evaluating key expressions. let mut key_mfp = expr :: MapFilterProject :: new ( input_arity ) . map ( group_key . iter ( ) . cloned ( ) ) . project ( input_arity .. ( input_arity + group_key . len ( ) ) ) ; // Form an operator for evaluating value expressions. let mut val_mfp = expr :: MapFilterProject :: new ( input_arity ) . map ( aggregates . iter ( ) . map ( | a | a . expr . clone ( ) ) ) . project ( input_arity .. ( input_arity + aggregates . len ( ) ) ) ; key_mfp . optimize ( ) ; let key_plan = key_mfp . into_plan ( ) . unwrap ( ) . into_nontemporal ( ) . unwrap ( ) ; val_mfp . optimize ( ) ; let val_plan = val_mfp . into_plan ( ) . unwrap ( ) . into_nontemporal ( ) . unwrap ( ) ; Self { key_plan , val_plan } }
Create a new [KeyValPlan] from aggregation arguments.
Create a new [ KeyValPlan ] from aggregation arguments .
input_arity
usize
group_key
&[expr::MirScalarExpr]
aggregates
&[AggregateExpr]
input_arity
usize
group_key
&[expr::MirScalarExpr]
aggregates
&[AggregateExpr]