pub trait DataSource: Send {
// Required methods
fn schema(&self) -> SchemaRef;
fn next_batch(&mut self) -> Result<Option<RecordBatch>>;
// Provided methods
fn size_hint(&self) -> Option<usize> { ... }
fn reset(&mut self) -> Result<()> { ... }
}Expand description
A data source that can produce RecordBatches on demand.
Required Methods§
Sourcefn next_batch(&mut self) -> Result<Option<RecordBatch>>
fn next_batch(&mut self) -> Result<Option<RecordBatch>>
Returns the next batch of data, or None if exhausted.
§Errors
Returns an error if reading the next batch fails.