pub type SendableRecordBatchStream = Pin<Box<dyn RecordBatchStream + Send>>;
Expand description
Trait for a Stream
of RecordBatch
es that can be passed between threads
This trait is used to retrieve the results of DataFusion execution plan nodes.
The trait is a specialized Rust Async Stream
that also knows the schema
of the data it will return (even if the stream has no data). Every
RecordBatch
returned by the stream should have the same schema as returned
by schema
.
§Error Handling
Once a stream returns an error, it should not be polled again (the caller
should stop calling next
) and handle the error.
However, returning Ready(None)
(end of stream) is likely the safest
behavior after an error. Like Stream
s, RecordBatchStream
s should not
be polled after end of stream or returning an error. However, also like
Stream
s there is no mechanism to prevent callers polling so returning
Ready(None)
is recommended.
Aliased Type§
struct SendableRecordBatchStream {}