async fn run_logical_plans(
        &self,
        plans: Vec<LogicalPlan>,
        executor_type: ExecutorType,
    ) -> Result<Vec<RecordBatch>> {
        let value_futures = plans
            .into_iter()
            .map(|plan| {
                let ctx = self.new_context(executor_type);

                self.run(
                    async move {
                        let physical_plan = ctx
                            .prepare_plan(&plan)
                            .context(DataFusionPhysicalPlanning)?;

                        // TODO: avoid this buffering
                        ctx.collect(physical_plan)
                            .await
                            .context(DataFusionExecution)
                    },
                    executor_type,
                )
            })
            .collect::<Vec<_>>();

        // now, wait for all the values to resolve and collect them together
        let mut results = Vec::new();
        for join_handle in value_futures {
            let mut plan_result = join_handle.await??;
            results.append(&mut plan_result);
        }
        Ok(results)
    }
/// plans and runs the plans in parallel and collects the results
/// run each plan in parallel and collect the results
plans and runs the plans in parallel and collects the results
run each plan in parallel and collect the results
plans and runs the plans in parallel and collects the results run each plan in parallel and collect the results
async fn run_logical_plans(
        &self,
        plans: Vec<LogicalPlan>,
        executor_type: ExecutorType,
    ) -> Result<Vec<RecordBatch>> {
        let value_futures = plans
            .into_iter()
            .map(|plan| {
                let ctx = self.new_context(executor_type);
                self.run(
                    async move {
                        let physical_plan = ctx
                            .prepare_plan(&plan)
                            .context(DataFusionPhysicalPlanning)?;
                        // TODO: avoid this buffering
                        ctx.collect(physical_plan)
                            .await
                            .context(DataFusionExecution)
                    },
                    executor_type,
                )
            })
            .collect::<Vec<_>>();
        // now, wait for all the values to resolve and collect them together
        let mut results = Vec::new();
        for join_handle in value_futures {
            let mut plan_result = join_handle.await??;
            results.append(&mut plan_result);
        }
        Ok(results)
    }
async fn run_logical_plans ( & self , plans : Vec < LogicalPlan > , executor_type : ExecutorType , ) -> Result < Vec < RecordBatch > > { let value_futures = plans . into_iter ( ) . map ( | plan | { let ctx = self . new_context ( executor_type ) ; self . run ( async move { let physical_plan = ctx . prepare_plan ( & plan ) . context ( DataFusionPhysicalPlanning ) ? ; // TODO: avoid this buffering ctx . collect ( physical_plan ) . await . context ( DataFusionExecution ) } , executor_type , ) } ) . collect :: < Vec < _ > > ( ) ; // now, wait for all the values to resolve and collect them together let mut results = Vec :: new ( ) ; for join_handle in value_futures { let mut plan_result = join_handle . await ? ? ; results . append ( & mut plan_result ) ; } Ok ( results ) }
plans and runs the plans in parallel and collects the results
run each plan in parallel and collect the results
plans and runs the plans in parallel and collects the results run each plan in parallel and collect the results
&self
plans
Vec<LogicalPlan>
executor_type
ExecutorType
&self
plans
Vec<LogicalPlan>
executor_type
ExecutorType