pub async fn collect(
        &mut self,
        logical_plan: &LogicalPlan,
    ) -> Result<SendableRecordBatchStream> {
        let datafusion_ctx = ExecutionContext::new();
        let plan = datafusion_ctx.optimize(logical_plan)?;
        let plan = datafusion_ctx.create_physical_plan(&plan)?;
        let plan = self.execute_distributed_query(plan).await?;
        let plan = Arc::new(CollectExec::new(plan));
        plan.execute(0).await.map_err(|e| e.into())
    }
/// Execute a logical plan using distributed query execution and collect the results into a
/// vector of [RecordBatch].
Execute a logical plan using distributed query execution and collect the results into a
vector of [RecordBatch].
Execute a logical plan using distributed query execution and collect the results into a vector of [ RecordBatch ] .
pub async fn collect(
        &mut self,
        logical_plan: &LogicalPlan,
    ) -> Result<SendableRecordBatchStream> {
        let datafusion_ctx = ExecutionContext::new();
        let plan = datafusion_ctx.optimize(logical_plan)?;
        let plan = datafusion_ctx.create_physical_plan(&plan)?;
        let plan = self.execute_distributed_query(plan).await?;
        let plan = Arc::new(CollectExec::new(plan));
        plan.execute(0).await.map_err(|e| e.into())
    }
pub async fn collect ( & mut self , logical_plan : & LogicalPlan , ) -> Result < SendableRecordBatchStream > { let datafusion_ctx = ExecutionContext :: new ( ) ; let plan = datafusion_ctx . optimize ( logical_plan ) ? ; let plan = datafusion_ctx . create_physical_plan ( & plan ) ? ; let plan = self . execute_distributed_query ( plan ) . await ? ; let plan = Arc :: new ( CollectExec :: new ( plan ) ) ; plan . execute ( 0 ) . await . map_err ( | e | e . into ( ) ) }
Execute a logical plan using distributed query execution and collect the results into a
vector of [RecordBatch].
Execute a logical plan using distributed query execution and collect the results into a vector of [ RecordBatch ] .
&mut self
logical_plan
&LogicalPlan
&mut self
logical_plan
&LogicalPlan