Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
Currently, executing using the table API requires some effort: given a table `t`:
plan = t.to_logical_plan() plan = ctx.optimize(plan) plan = ctx.create_physical_plan(plan, batch_size) result = ctx.collect(plan)
This issue proposes 2 new public methods, one for Table,
fn collect(&self, ctx: &mut ExecutionContext, batch_size: usize) -> Result<Vec<RecordBatch>>;
and one for ExecutionContext,
pub fn collect_plan(&mut self, plan: &LogicalPlan, batch_size: usize) -> Result<Vec<RecordBatch>>
that optimize, execute and collect the results of the Table/LogicalPlan respectively, in the same spirit of `ExecutionContext.sql`.
Attachments
Issue Links
- links to