Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7787

[Rust] Add collect to Table API

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              Campins Jorge
              jorgecarleitao Jorge Leitão
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Time Spent - 0.5h Remaining Estimate - 1.5h
                  1.5h
                  Logged:
                  Time Spent - 0.5h Remaining Estimate - 1.5h
                  0.5h