pub trait RecordBatchStream: Stream<Item = Result<RecordBatch, DataFusionError>> {
// Required method
fn schema(&self) -> Arc<Schema> ⓘ;
}Expand description
The record-batch stream trait, re-exported for the same reason as
MemoryPool.
A fragment’s real output schema is the one its stream declares, not the
one its DataFrame does — physical planning re-types expressions, and
TPC-H q17 shipped batches of Decimal128(30, 15) under a logical schema
that said Decimal128(15, 2). Reading it needs this trait in scope, and
the executor should not take a DataFusion dependency to do that.
Trait for types that stream RecordBatch
See SendableRecordBatchStream for more details.
Required Methods§
Trait Implementations§
Source§impl From<StreamType> for Pin<Box<dyn RecordBatchStream<Item = Result<RecordBatch, DataFusionError>> + Send>>
impl From<StreamType> for Pin<Box<dyn RecordBatchStream<Item = Result<RecordBatch, DataFusionError>> + Send>>
Source§fn from(
stream: StreamType,
) -> Pin<Box<dyn RecordBatchStream<Item = Result<RecordBatch, DataFusionError>> + Send>>
fn from( stream: StreamType, ) -> Pin<Box<dyn RecordBatchStream<Item = Result<RecordBatch, DataFusionError>> + Send>>
Converts to this type from the input type.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".