Skip to main content

Module series_frame

Module series_frame 

Source
Expand description

Streaming boundary between finite raw-series chunks and DataFusion record batches.

Schema fields identify the ordered logical payload fields and codec layout; additional application metadata is permitted when stable across the stream. A key-encoded frame also declares its own label decode description, and the frame is the sole source of decode information: unpack_raw_series reads the fields, the label mode, the description, and the producer ordering from the received schema, keeps the description on the returned stream, and therefore needs no [RawLabelSource]. A caller that holds a scan-bound identity β€” the physical region key layout a decoded identity came from β€” compares that identity’s declared label decode layout with ensure_frame_matches_label_source instead of passing it as a decode input; that comparison is equality of the description alone and proves nothing about region identity or provenance, and neither side is authenticated as field provenance. This adapter preserves scan candidates only; it is not a residual filter, authorization check, remote transport, or compaction boundary. Raw frames accept all three [SeriesOrdering] declarations, while evaluated frames accept only Contiguous. Raw Interleaved supports independently closed producer fragment chains in sequence, including recurring keys; it does not multiplex open chains.

An evaluated frame is the same physical family: pack_evaluated_series and unpack_evaluated_series carry computed values under complete labels and grid positions, so a compute consumer needs neither a storage key nor a scan binding to read them.

StructsΒ§

EvaluatedSequenceValidator
Cross-chunk validation state for evaluated chains.
PackBatches πŸ”’
The batching half of a pack stream: the builder, the cursor installed in it, and the declared schema every ready batch is published under.
PackEvaluatedStream πŸ”’
The pack stream of pack_evaluated_series.
PackStateStream πŸ”’
The pack stream of pack_aggregate_state.
PackStream πŸ”’
PendingFlush πŸ”’
Bounded batching across a pending raw source.
SequenceValidator
Cross-chunk validation state for raw producer fragment chains. Every chain’s chunks must be contiguous, including for Interleaved; this validator checks adjacent chunks only and retains the previous owned key (not an Arrow buffer), timestamp, metric, and finality. An Interleaved chain releases that state on closure, so later fragment chains may recur with the same key, labels, and timestamps independently.
UnpackEvaluatedStream πŸ”’
The unpack stream of unpack_evaluated_series.
UnpackStateStream πŸ”’
The unpack stream of unpack_aggregate_state.
UnpackStream πŸ”’

EnumsΒ§

PendingBatching
How a pack stream treats the rows it has buffered when its source reports Pending.

ConstantsΒ§

MAX_EMPTY_BATCHES_PER_POLL πŸ”’
How many empty batches one poll reads before yielding, so a stream of them cannot hold the task.
ORDERING_KEY πŸ”’
PENDING_FLUSH_DELAY πŸ”’
How long a pending source may keep buffered rows before they are published as a batch of their own.

FunctionsΒ§

codec_error πŸ”’
current_runtime_id πŸ”’
The runtime that would own a timer armed by the current poll, if there is one.
declared_label_mode πŸ”’
Returns the label mode a frame declares: a key frame describes its key, an explicit frame carries complete labels and declares no description.
ensure_contiguous_ordering πŸ”’
Rejects an evaluated frame that claims more order than its producer promised.
ensure_declared_schema πŸ”’
Rejects an expected series schema the frame does not declare.
ensure_frame_matches_label_source
Checks that a frame declares the label decode layout a scan-bound binding describes.
frame_schema_with
Assembles a declared frame schema from an explicit label mode and decode description.
invalid πŸ”’
label_decode_spec
Derives the label decode description a frame must carry for this binding.
label_mode πŸ”’
pack_aggregate_state
Packs aggregate-state chunks into bounded DataFusion record batches.
pack_evaluated_series
Packs a stream of evaluated chunks into DataFusion record batches incrementally.
pack_raw_series
Packs a storage raw-series stream into DataFusion record batches incrementally.
pack_raw_series_with
Packs a storage raw-series stream with the pending batching its poller can support.
raw_series_frame_schema_with_ordering
Builds the canonical raw frame schema with the producer’s label binding and ordering.
series_frame_ordering
Reads the producer ordering declared by a complete v2 frame schema.
unpack_aggregate_state
Unpacks aggregate-state frames while retaining Arrow-backed state rows.
unpack_error πŸ”’
Wraps a decode or validation error as the boxed error an unpack stream reports.
unpack_evaluated_series
Unpacks DataFusion batches declared by pack_evaluated_series.
unpack_raw_series
Unpacks DataFusion batches declared by pack_raw_series.
upstream_error πŸ”’

Type AliasesΒ§

SendableEvaluatedSeriesStream
A stream of evaluated series chunks and their finality.
SendableStateFrameStream
A stream of decoded state rows retaining typed handles into their Arrow batch.
SendableStateSeriesStream
A stream of aggregate-state chunks and their producer-local finality.