diff --git a/crates/proof-of-sql/src/sql/proof/proof_plan.rs b/crates/proof-of-sql/src/sql/proof/proof_plan.rs index 430485308..fad2c8289 100644 --- a/crates/proof-of-sql/src/sql/proof/proof_plan.rs +++ b/crates/proof-of-sql/src/sql/proof/proof_plan.rs @@ -52,7 +52,7 @@ pub trait ProverEvaluate { /// Evaluate the query and modify `FirstRoundBuilder` to track the result of the query. fn result_evaluate<'a>( &self, - input_length: usize, + input_lengths: &[usize], alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Vec>; @@ -68,6 +68,7 @@ pub trait ProverEvaluate { /// will be bulk deallocated once the proof is formed. fn final_round_evaluate<'a>( &self, + input_lengths: &[usize], builder: &mut FinalRoundBuilder<'a, S>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, diff --git a/crates/proof-of-sql/src/sql/proof_exprs/add_subtract_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/add_subtract_expr.rs index 10a623f85..1d713df5b 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/add_subtract_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/add_subtract_expr.rs @@ -79,12 +79,17 @@ impl ProofExpr for AddSubtractExpr { )] fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { - let lhs_column: Column<'a, C::Scalar> = self.lhs.prover_evaluate(builder, alloc, accessor); - let rhs_column: Column<'a, C::Scalar> = self.rhs.prover_evaluate(builder, alloc, accessor); + let lhs_column: Column<'a, C::Scalar> = + self.lhs + .prover_evaluate(table_length, builder, alloc, accessor); + let rhs_column: Column<'a, C::Scalar> = + self.rhs + .prover_evaluate(table_length, builder, alloc, accessor); Column::Scalar(add_subtract_columns( lhs_column, rhs_column, diff --git a/crates/proof-of-sql/src/sql/proof_exprs/aggregate_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/aggregate_expr.rs index d11c157b5..9764483e9 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/aggregate_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/aggregate_expr.rs @@ -55,11 +55,13 @@ impl ProofExpr for AggregateExpr { #[tracing::instrument(name = "AggregateExpr::prover_evaluate", level = "debug", skip_all)] fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { - self.expr.prover_evaluate(builder, alloc, accessor) + self.expr + .prover_evaluate(table_length, builder, alloc, accessor) } fn verifier_evaluate( diff --git a/crates/proof-of-sql/src/sql/proof_exprs/and_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/and_expr.rs index d1166733d..f25e2a2ab 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/and_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/and_expr.rs @@ -60,12 +60,17 @@ impl ProofExpr for AndExpr { #[tracing::instrument(name = "AndExpr::prover_evaluate", level = "debug", skip_all)] fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { - let lhs_column: Column<'a, C::Scalar> = self.lhs.prover_evaluate(builder, alloc, accessor); - let rhs_column: Column<'a, C::Scalar> = self.rhs.prover_evaluate(builder, alloc, accessor); + let lhs_column: Column<'a, C::Scalar> = + self.lhs + .prover_evaluate(table_length, builder, alloc, accessor); + let rhs_column: Column<'a, C::Scalar> = + self.rhs + .prover_evaluate(table_length, builder, alloc, accessor); let lhs = lhs_column.as_boolean().expect("lhs is not boolean"); let rhs = rhs_column.as_boolean().expect("rhs is not boolean"); let n = lhs.len(); diff --git a/crates/proof-of-sql/src/sql/proof_exprs/column_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/column_expr.rs index 93b7be813..18e05941e 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/column_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/column_expr.rs @@ -75,11 +75,13 @@ impl ProofExpr for ColumnExpr { /// add the components needed to prove the result fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, _alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { let column = accessor.get_column(self.column_ref); + assert!(column.len() == table_length); builder.produce_anchored_mle(column); column } diff --git a/crates/proof-of-sql/src/sql/proof_exprs/dyn_proof_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/dyn_proof_expr.rs index 63611cb59..c3fdd27ea 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/dyn_proof_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/dyn_proof_expr.rs @@ -253,40 +253,41 @@ impl ProofExpr for DynProofExpr { fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { match self { DynProofExpr::Column(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } DynProofExpr::And(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } DynProofExpr::Or(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } DynProofExpr::Not(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } DynProofExpr::Literal(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } DynProofExpr::Equals(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } DynProofExpr::Inequality(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } DynProofExpr::AddSubtract(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } DynProofExpr::Multiply(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } DynProofExpr::Aggregate(expr) => { - ProofExpr::::prover_evaluate(expr, builder, alloc, accessor) + ProofExpr::::prover_evaluate(table_length, expr, builder, alloc, accessor) } } } diff --git a/crates/proof-of-sql/src/sql/proof_exprs/equals_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/equals_expr.rs index 58cfa6155..a4ef6292c 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/equals_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/equals_expr.rs @@ -59,12 +59,17 @@ impl ProofExpr for EqualsExpr { #[tracing::instrument(name = "EqualsExpr::prover_evaluate", level = "debug", skip_all)] fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { - let lhs_column = self.lhs.prover_evaluate(builder, alloc, accessor); - let rhs_column = self.rhs.prover_evaluate(builder, alloc, accessor); + let lhs_column = self + .lhs + .prover_evaluate(table_length, builder, alloc, accessor); + let rhs_column = self + .rhs + .prover_evaluate(table_length, builder, alloc, accessor); let lhs_scale = self.lhs.data_type().scale().unwrap_or(0); let rhs_scale = self.rhs.data_type().scale().unwrap_or(0); let res = scale_and_subtract(alloc, lhs_column, rhs_column, lhs_scale, rhs_scale, true) diff --git a/crates/proof-of-sql/src/sql/proof_exprs/inequality_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/inequality_expr.rs index f1f647682..fd9839129 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/inequality_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/inequality_expr.rs @@ -86,12 +86,17 @@ impl ProofExpr for InequalityExpr { #[tracing::instrument(name = "InequalityExpr::prover_evaluate", level = "debug", skip_all)] fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { - let lhs_column = self.lhs.prover_evaluate(builder, alloc, accessor); - let rhs_column = self.rhs.prover_evaluate(builder, alloc, accessor); + let lhs_column = self + .lhs + .prover_evaluate(table_length, builder, alloc, accessor); + let rhs_column = self + .rhs + .prover_evaluate(table_length, builder, alloc, accessor); let lhs_scale = self.lhs.data_type().scale().unwrap_or(0); let rhs_scale = self.rhs.data_type().scale().unwrap_or(0); let diff = if self.is_lte { diff --git a/crates/proof-of-sql/src/sql/proof_exprs/literal_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/literal_expr.rs index c00af32d1..7e0405e62 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/literal_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/literal_expr.rs @@ -57,11 +57,11 @@ impl ProofExpr for LiteralExpr { #[tracing::instrument(name = "LiteralExpr::prover_evaluate", level = "debug", skip_all)] fn prover_evaluate<'a>( &self, - builder: &mut FinalRoundBuilder<'a, C::Scalar>, + table_length: usize, + _builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, _accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { - let table_length = builder.table_length(); Column::from_literal_with_length(&self.value, table_length, alloc) } diff --git a/crates/proof-of-sql/src/sql/proof_exprs/multiply_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/multiply_expr.rs index 9e3dad92e..4276cac95 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/multiply_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/multiply_expr.rs @@ -69,12 +69,17 @@ impl ProofExpr for MultiplyExpr { )] fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { - let lhs_column: Column<'a, C::Scalar> = self.lhs.prover_evaluate(builder, alloc, accessor); - let rhs_column: Column<'a, C::Scalar> = self.rhs.prover_evaluate(builder, alloc, accessor); + let lhs_column: Column<'a, C::Scalar> = + self.lhs + .prover_evaluate(table_length, builder, alloc, accessor); + let rhs_column: Column<'a, C::Scalar> = + self.rhs + .prover_evaluate(table_length, builder, alloc, accessor); // lhs_times_rhs let lhs_times_rhs: &'a [C::Scalar] = multiply_columns(&lhs_column, &rhs_column, alloc); diff --git a/crates/proof-of-sql/src/sql/proof_exprs/not_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/not_expr.rs index 194d5b9be..7bd46b974 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/not_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/not_expr.rs @@ -50,12 +50,14 @@ impl ProofExpr for NotExpr { #[tracing::instrument(name = "NotExpr::prover_evaluate", level = "debug", skip_all)] fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { let expr_column: Column<'a, C::Scalar> = - self.expr.prover_evaluate(builder, alloc, accessor); + self.expr + .prover_evaluate(table_length, builder, alloc, accessor); let expr = expr_column.as_boolean().expect("expr is not boolean"); Column::Boolean(alloc.alloc_slice_fill_with(expr.len(), |i| !expr[i])) } diff --git a/crates/proof-of-sql/src/sql/proof_exprs/or_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/or_expr.rs index e31c2a9c9..bec4c4504 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/or_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/or_expr.rs @@ -58,12 +58,17 @@ impl ProofExpr for OrExpr { #[tracing::instrument(name = "OrExpr::prover_evaluate", level = "debug", skip_all)] fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Column<'a, C::Scalar> { - let lhs_column: Column<'a, C::Scalar> = self.lhs.prover_evaluate(builder, alloc, accessor); - let rhs_column: Column<'a, C::Scalar> = self.rhs.prover_evaluate(builder, alloc, accessor); + let lhs_column: Column<'a, C::Scalar> = + self.lhs + .prover_evaluate(table_length, builder, alloc, accessor); + let rhs_column: Column<'a, C::Scalar> = + self.rhs + .prover_evaluate(table_length, builder, alloc, accessor); let lhs = lhs_column.as_boolean().expect("lhs is not boolean"); let rhs = rhs_column.as_boolean().expect("rhs is not boolean"); Column::Boolean(prover_evaluate_or(builder, alloc, lhs, rhs)) diff --git a/crates/proof-of-sql/src/sql/proof_exprs/proof_expr.rs b/crates/proof-of-sql/src/sql/proof_exprs/proof_expr.rs index 88f215484..d0a1ca057 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/proof_expr.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/proof_expr.rs @@ -32,6 +32,7 @@ pub trait ProofExpr: Debug + Send + Sync { /// of values fn prover_evaluate<'a>( &self, + table_length: usize, builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, diff --git a/crates/proof-of-sql/src/sql/proof_plans/filter_exec.rs b/crates/proof-of-sql/src/sql/proof_plans/filter_exec.rs index 28895df61..03fe39712 100644 --- a/crates/proof-of-sql/src/sql/proof_plans/filter_exec.rs +++ b/crates/proof-of-sql/src/sql/proof_plans/filter_exec.rs @@ -148,10 +148,12 @@ impl ProverEvaluate for FilterExec { #[tracing::instrument(name = "FilterExec::result_evaluate", level = "debug", skip_all)] fn result_evaluate<'a>( &self, - input_length: usize, + input_lengths: &[usize], alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Vec> { + assert!(input_lengths.len() == 1); + let input_length = input_lengths[0]; // 1. selection let selection_column: Column<'a, C::Scalar> = self.where_clause @@ -184,13 +186,16 @@ impl ProverEvaluate for FilterExec { #[allow(unused_variables)] fn final_round_evaluate<'a>( &self, + input_lengths: &[usize], builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Vec> { + assert!(input_lengths.len() == 1); + let input_length = input_lengths[0]; // 1. selection let selection_column: Column<'a, C::Scalar> = - self.where_clause.prover_evaluate(builder, alloc, accessor); + self.where_clause.prover_evaluate(input_length, builder, alloc, accessor); let selection = selection_column .as_boolean() .expect("selection is not boolean"); @@ -199,7 +204,7 @@ impl ProverEvaluate for FilterExec { let columns: Vec<_> = self .aliased_results .iter() - .map(|aliased_expr| aliased_expr.expr.prover_evaluate(builder, alloc, accessor)) + .map(|aliased_expr| aliased_expr.expr.prover_evaluate(input_length, builder, alloc, accessor)) .collect(); // Compute filtered_columns let (filtered_columns, result_len) = filter_columns(alloc, &columns, selection); diff --git a/crates/proof-of-sql/src/sql/proof_plans/filter_exec_test_dishonest_prover.rs b/crates/proof-of-sql/src/sql/proof_plans/filter_exec_test_dishonest_prover.rs index 4d32bc735..4dcba7d18 100644 --- a/crates/proof-of-sql/src/sql/proof_plans/filter_exec_test_dishonest_prover.rs +++ b/crates/proof-of-sql/src/sql/proof_plans/filter_exec_test_dishonest_prover.rs @@ -37,10 +37,12 @@ impl ProverEvaluate for DishonestFilterExec { )] fn result_evaluate<'a>( &self, - input_length: usize, + input_lengths: &[usize], alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Vec> { + assert!(input_lengths.len() == 1); + let input_length = input_lengths[0]; // 1. selection let selection_column: Column<'a, Curve25519Scalar> = self.where_clause @@ -76,13 +78,16 @@ impl ProverEvaluate for DishonestFilterExec { #[allow(unused_variables)] fn final_round_evaluate<'a>( &self, + table_lengths: &[usize], builder: &mut FinalRoundBuilder<'a, Curve25519Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Vec> { + assert!(input_lengths.len() == 1); + let input_length = input_lengths[0]; // 1. selection let selection_column: Column<'a, Curve25519Scalar> = - self.where_clause.prover_evaluate(builder, alloc, accessor); + self.where_clause.prover_evaluate(input_length, builder, alloc, accessor); let selection = selection_column .as_boolean() .expect("selection is not boolean"); @@ -90,7 +95,7 @@ impl ProverEvaluate for DishonestFilterExec { let columns: Vec<_> = self .aliased_results .iter() - .map(|aliased_expr| aliased_expr.expr.prover_evaluate(builder, alloc, accessor)) + .map(|aliased_expr| aliased_expr.expr.prover_evaluate(input_length, builder, alloc, accessor)) .collect(); // Compute filtered_columns let (filtered_columns, result_len) = filter_columns(alloc, &columns, selection); diff --git a/crates/proof-of-sql/src/sql/proof_plans/group_by_exec.rs b/crates/proof-of-sql/src/sql/proof_plans/group_by_exec.rs index 069aa08d1..174b85de6 100644 --- a/crates/proof-of-sql/src/sql/proof_plans/group_by_exec.rs +++ b/crates/proof-of-sql/src/sql/proof_plans/group_by_exec.rs @@ -208,10 +208,12 @@ impl ProverEvaluate for GroupByExec { #[tracing::instrument(name = "GroupByExec::result_evaluate", level = "debug", skip_all)] fn result_evaluate<'a>( &self, - input_length: usize, + input_lengths: &[usize], alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Vec> { + assert!(input_lengths.len() == 1); + let input_length = input_lengths[0]; // 1. selection let selection_column: Column<'a, C::Scalar> = self.where_clause @@ -260,13 +262,16 @@ impl ProverEvaluate for GroupByExec { #[allow(unused_variables)] fn final_round_evaluate<'a>( &self, + input_lengths: &[usize], builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Vec> { + assert!(input_lengths.len() == 1); + let input_length = input_lengths[0]; // 1. selection let selection_column: Column<'a, C::Scalar> = - self.where_clause.prover_evaluate(builder, alloc, accessor); + self.where_clause.prover_evaluate(input_length, builder, alloc, accessor); let selection = selection_column .as_boolean() .expect("selection is not boolean"); @@ -275,12 +280,12 @@ impl ProverEvaluate for GroupByExec { let group_by_columns = self .group_by_exprs .iter() - .map(|expr| expr.prover_evaluate(builder, alloc, accessor)) + .map(|expr| expr.prover_evaluate(input_length, builder, alloc, accessor)) .collect::>(); let sum_columns = self .sum_expr .iter() - .map(|aliased_expr| aliased_expr.expr.prover_evaluate(builder, alloc, accessor)) + .map(|aliased_expr| aliased_expr.expr.prover_evaluate(input_length, builder, alloc, accessor)) .collect::>(); // 3. Compute filtered_columns let AggregatedColumns { diff --git a/crates/proof-of-sql/src/sql/proof_plans/projection_exec.rs b/crates/proof-of-sql/src/sql/proof_plans/projection_exec.rs index fb66bff00..e8ebb1ae6 100644 --- a/crates/proof-of-sql/src/sql/proof_plans/projection_exec.rs +++ b/crates/proof-of-sql/src/sql/proof_plans/projection_exec.rs @@ -98,17 +98,19 @@ impl ProverEvaluate for ProjectionExec { #[tracing::instrument(name = "ProjectionExec::result_evaluate", level = "debug", skip_all)] fn result_evaluate<'a>( &self, - input_length: usize, + input_lengths: &[usize], alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Vec> { + assert!(input_lengths.len() == 1); + let input_length = input_lengths[0]; let columns: Vec<_> = self .aliased_results .iter() .map(|aliased_expr| { aliased_expr .expr - .result_evaluate(input_length, alloc, accessor) + .result_evaluate(input_lengths, alloc, accessor) }) .collect(); columns @@ -124,15 +126,18 @@ impl ProverEvaluate for ProjectionExec { #[allow(unused_variables)] fn final_round_evaluate<'a>( &self, + input_lengths: &[usize], builder: &mut FinalRoundBuilder<'a, C::Scalar>, alloc: &'a Bump, accessor: &'a dyn DataAccessor, ) -> Vec> { + assert!(input_lengths.len() == 1); + let input_length = input_lengths[0]; // 1. Evaluate result expressions let res: Vec<_> = self .aliased_results .iter() - .map(|aliased_expr| aliased_expr.expr.prover_evaluate(builder, alloc, accessor)) + .map(|aliased_expr| aliased_expr.expr.prover_evaluate(input_length, builder, alloc, accessor)) .collect(); // 2. Produce MLEs res.clone().into_iter().for_each(|column| {