jizezhang commented on code in PR #19342:
URL: https://github.com/apache/datafusion/pull/19342#discussion_r2635203037
##########
datafusion/physical-plan/src/async_func.rs:
##########
@@ -221,6 +234,49 @@ impl ExecutionPlan for AsyncFuncExec {
}
}
+struct CoalesceInputStream {
+ input_stream: Pin<Box<dyn RecordBatchStream + Send>>,
+ batch_coalescer: LimitedBatchCoalescer,
+}
+
+impl Stream for CoalesceInputStream {
+ type Item = Result<RecordBatch>;
+
+ fn poll_next(
+ mut self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ ) -> Poll<Option<Self::Item>> {
+ let mut completed = false;
+
Review Comment:
Do we want to track `elapsed_compute` time for coalescing? e.g.
https://github.com/apache/datafusion/blob/887aa9f8c641cfcac4053da3dd5ad3c4b7ffe425/datafusion/physical-plan/src/coalesce_batches.rs#L296
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]