[ https://issues.apache.org/jira/browse/ARROW-7787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jorge updated ARROW-7787: ------------------------- Description: Currently, executing using the table API requires some effort: given a table `t`: {code:java} plan = t.to_logical_plan() plan = ctx.optimize(plan) plan = ctx.create_physical_plan(plan, batch_size) result = ctx.collect(plan) {code} This issue proposes 2 new public methods, one for Table, {code:java} fn collect(&self, ctx: &mut ExecutionContext, batch_size: usize) -> Result<Vec<RecordBatch>>; {code} and one for ExecutionContext, {code:java} pub fn collect_plan(&mut self, plan: &LogicalPlan, batch_size: usize) -> Result<Vec<RecordBatch>> {code} that optimize, execute and collect the results of the Table/LogicalPlan respectively, in the same spirit of `ExecutionContext.sql`. was: Currently, executing using the table API requires some effort: given a table `t`: {code:java} plan = t.to_logical_plan() plan = ctx.optimize(plan) plan = ctx.create_physical_plan(plan, batch_size) result = ctx.collect(plan) {code} This issue proposes a 2 new public methods, one for Table, {code:java} fn collect(&self, ctx: &mut ExecutionContext, batch_size: usize) -> Result<Vec<RecordBatch>>; {code} and one for ExecutionContext, {code:java} pub fn collect_plan(&mut self, plan: &LogicalPlan, batch_size: usize) -> Result<Vec<RecordBatch>> {code} that optimize, execute and collect the results of the Table/LogicalPlan respectively, in the same spirit of `ExecutionContext.sql`. > Add collect to Table API > ------------------------ > > Key: ARROW-7787 > URL: https://issues.apache.org/jira/browse/ARROW-7787 > Project: Apache Arrow > Issue Type: Improvement > Components: Rust - DataFusion > Reporter: Jorge > Priority: Major > Original Estimate: 2h > Remaining Estimate: 2h > > Currently, executing using the table API requires some effort: given a table > `t`: > {code:java} > plan = t.to_logical_plan() > plan = ctx.optimize(plan) > plan = ctx.create_physical_plan(plan, batch_size) > result = ctx.collect(plan) > {code} > This issue proposes 2 new public methods, one for Table, > {code:java} > fn collect(&self, ctx: &mut ExecutionContext, batch_size: usize) -> > Result<Vec<RecordBatch>>; > {code} > and one for ExecutionContext, > {code:java} > pub fn collect_plan(&mut self, plan: &LogicalPlan, batch_size: usize) -> > Result<Vec<RecordBatch>> > {code} > that optimize, execute and collect the results of the Table/LogicalPlan > respectively, in the same spirit of `ExecutionContext.sql`. > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)