Skip to main content

pack_evaluated_series

Function pack_evaluated_series 

Source
pub fn pack_evaluated_series(
    source: SendableEvaluatedSeriesStream,
    schema: Arc<SeriesSchema>,
) -> Result<DfSendableRecordBatchStream>
Expand description

Packs a stream of evaluated chunks into DataFusion record batches incrementally.

An evaluated frame names its series by their complete labels and addresses time on the evaluation grid schema declares, so there is nothing to decode and no storage key to carry: the frame declares explicit identity and grid_spans time, and the grid is written once instead of repeating timestamps on every row.

Only [SeriesOrdering::Contiguous] is declared, because that is the one ordering this layer can promise and check: each chunk chain is contiguous with itself. A caller that has reason to claim [SeriesOrdering::KeyThenTime] about computed values would have to justify it, and a consumer must never infer it from the presence of labels.

Bounds, backpressure, and error handling are the raw path’s: rows accumulate into batches bounded by the builder’s row and estimated payload limits, a ready batch is yielded before the source is polled again, and a Pending source still delivers what is buffered.