File tree 1 file changed +9
-2
lines changed
datafusion/physical-plan/src
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 15
15
// specific language governing permissions and limitations
16
16
// under the License.
17
17
18
- //! Execution plan for streaming [`PartitionStream`]
18
+ //! Generic plans for deferred execution: [`StreamingTableExec`] and [`PartitionStream`]
19
19
20
20
use std:: any:: Any ;
21
21
use std:: sync:: Arc ;
@@ -35,6 +35,10 @@ use futures::stream::StreamExt;
35
35
use log:: debug;
36
36
37
37
/// A partition that can be converted into a [`SendableRecordBatchStream`]
38
+ ///
39
+ /// Combined with [`StreamingTableExec`], you can use this trait to implement
40
+ /// [`ExecutionPlan`] for a custom source with less boiler plate than
41
+ /// implementing `ExecutionPlan` directly for many use cases.
38
42
pub trait PartitionStream : Send + Sync {
39
43
/// Returns the schema of this partition
40
44
fn schema ( & self ) -> & SchemaRef ;
@@ -43,7 +47,10 @@ pub trait PartitionStream: Send + Sync {
43
47
fn execute ( & self , ctx : Arc < TaskContext > ) -> SendableRecordBatchStream ;
44
48
}
45
49
46
- /// An [`ExecutionPlan`] for [`PartitionStream`]
50
+ /// An [`ExecutionPlan`] for one or more [`PartitionStream`]s.
51
+ ///
52
+ /// If your source can be represented as one or more [`PartitionStream`]s, you can
53
+ /// use this struct to implement [`ExecutionPlan`].
47
54
pub struct StreamingTableExec {
48
55
partitions : Vec < Arc < dyn PartitionStream > > ,
49
56
projection : Option < Arc < [ usize ] > > ,
You can’t perform that action at this time.
0 commit comments