jorgecarleitao commented on a change in pull request #8428:
URL: https://github.com/apache/arrow/pull/8428#discussion_r502822633
##########
File path: rust/datafusion/src/datasource/memory.rs
##########
@@ -59,13 +61,22 @@ impl MemTable {
pub async fn load(t: &dyn TableProvider, batch_size: usize) ->
Result<Self> {
let schema = t.schema();
let exec = t.scan(&None, batch_size)?;
+ let partition_count = exec.output_partitioning().partition_count();
+
+ let mut tasks = Vec::with_capacity(partition_count);
+ for partition in 0..partition_count {
+ let exec = exec.clone();
+ let task: JoinHandle<Result<Vec<RecordBatch>>> = task::spawn(async
move {
+ let it = exec.execute(partition).await?;
+ Ok(it.into_iter().collect::<ArrowResult<Vec<RecordBatch>>>()?)
Review comment:
(I have not tested this)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]