datafusion_physical_plan::streaming

Trait PartitionStream

Source
pub trait PartitionStream:
    Debug
    + Send
    + Sync {
    // Required methods
    fn schema(&self) -> &SchemaRef;
    fn execute(&self, ctx: Arc<TaskContext>) -> SendableRecordBatchStream;
}
Expand description

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.

Required Methods§

Source

fn schema(&self) -> &SchemaRef

Returns the schema of this partition

Source

fn execute(&self, ctx: Arc<TaskContext>) -> SendableRecordBatchStream

Returns a stream yielding this partitions values

Implementors§