comphead commented on code in PR #8010:
URL: https://github.com/apache/arrow-datafusion/pull/8010#discussion_r1377918012
##########
datafusion/physical-plan/src/lib.rs:
##########
@@ -235,7 +235,28 @@ pub trait ExecutionPlan: Debug + DisplayAs + Send + Sync {
Ok(None)
}
- /// Begin execution of `partition`, returning a stream of
[`RecordBatch`]es.
+ /// Start plan execution for `partition`, returning a
[`SendableRecordBatchStream`] of [`RecordBatch`]es.
+ ///
+ ///
+ /// Often its needed to call
[`.await`](https://doc.rust-lang.org/std/keyword.await.html) just after the
stream async combinators.
+ /// To call it within the sync method please refer the snippet below. The
snippet can also be used to help output/debug the node execution on batch level
+ ///
+ /// ```no_run
+ /// use datafusion_common::DataFusionError;
+ ///
+ /// fn print_plan_exec() -> Result<(), DataFusionError> {
+ /// let stream = node.execute(0, task_ctx)?;
+ /// futures::stream::once(async move {
Review Comment:
okay, I'll include another use case with amending stream and returning it
back to the user. Like in
https://github.com/apache/arrow-datafusion/blob/main/datafusion/physical-plan/src/sorts/sort.rs#L895
@tustvold I believe you mean exactly that?
--
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]