Skip to main content

RecordBatchStream

Trait RecordBatchStream 

Source
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§

Source

fn schema(&self) -> Arc<Schema>

Returns the schema of this RecordBatchStream.

Implementation of this trait should guarantee that all RecordBatch’s returned by this stream should have the same schema as returned from this method.

Trait Implementations§

Source§

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>>

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".

Implementations on Foreign Types§

Source§

impl RecordBatchStream for BatchSplitStream

Source§

impl RecordBatchStream for BlockingStream

Source§

impl RecordBatchStream for EmptyRecordBatchStream

Source§

impl RecordBatchStream for FileStream

Source§

impl RecordBatchStream for LazyMemoryStream

Source§

impl RecordBatchStream for LimitStream

Source§

fn schema(&self) -> Arc<Schema>

Get the schema

Source§

impl RecordBatchStream for MemoryStream

Source§

fn schema(&self) -> Arc<Schema>

Get the schema

Source§

impl RecordBatchStream for SpillPoolReader

Source§

impl RecordBatchStream for TestStream

Source§

fn schema(&self) -> Arc<Schema>

Get the schema

Source§

impl<S> RecordBatchStream for RecordBatchStreamAdapter<S>

Source§

impl<T> RecordBatchStream for CooperativeStream<T>

Implementors§