You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2023/11/03 15:49:32 UTC

(arrow-datafusion) branch main updated: Minor: Improve documentation for `PartitionStream` and `StreamingTableExec` (#8035)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 2906a24e41 Minor: Improve documentation for  `PartitionStream` and `StreamingTableExec` (#8035)
2906a24e41 is described below

commit 2906a24e418081a995eebd2ca04cb2b4dc4a10e7
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Fri Nov 3 11:49:26 2023 -0400

    Minor: Improve documentation for  `PartitionStream` and `StreamingTableExec` (#8035)
    
    * Minor: Improve documentation for  `PartitionStream` and `StreamingTableExec`
    
    * fmt
    
    * fmt
---
 datafusion/physical-plan/src/streaming.rs | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/datafusion/physical-plan/src/streaming.rs b/datafusion/physical-plan/src/streaming.rs
index 27f03b727c..77b56e1d75 100644
--- a/datafusion/physical-plan/src/streaming.rs
+++ b/datafusion/physical-plan/src/streaming.rs
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-//! Execution plan for streaming [`PartitionStream`]
+//! Generic plans for deferred execution: [`StreamingTableExec`] and [`PartitionStream`]
 
 use std::any::Any;
 use std::sync::Arc;
@@ -35,6 +35,10 @@ use futures::stream::StreamExt;
 use log::debug;
 
 /// A partition that can be converted into a [`SendableRecordBatchStream`]
+///
+/// Combined with [`StreamingTableExec`], you can use this trait to implement
+/// [`ExecutionPlan`] for a custom source with less boiler plate than
+/// implementing `ExecutionPlan` directly for many use cases.
 pub trait PartitionStream: Send + Sync {
     /// Returns the schema of this partition
     fn schema(&self) -> &SchemaRef;
@@ -43,7 +47,10 @@ pub trait PartitionStream: Send + Sync {
     fn execute(&self, ctx: Arc<TaskContext>) -> SendableRecordBatchStream;
 }
 
-/// An [`ExecutionPlan`] for [`PartitionStream`]
+/// An [`ExecutionPlan`] for one or more [`PartitionStream`]s.
+///
+/// If your source can be represented as one or more [`PartitionStream`]s, you can
+/// use this struct to implement [`ExecutionPlan`].
 pub struct StreamingTableExec {
     partitions: Vec<Arc<dyn PartitionStream>>,
     projection: Option<Arc<[usize]>>,