Skip to main content

Module spill

Module spill 

Source
Expand description

Disk-backed spill buffer for blocking operators (Sort, HashAggregate, Window).

The budget is measured in the exact number of bytes each batch occupies in the spill encoding. SpillBuffer::push automatically flushes before a successful push could leave more encoded bytes in memory than the budget. Draining restores spilled batches first and then any in-memory tail, preserving input order. The temporary file is removed when the buffer (or its active drain iterator) is dropped.

Structs§

IndexedSpill
Disk-only physical-row store with constant-memory positional lookup.
SharedSpill
Immutable repeatable row materialization bounded by the source buffer’s memory budget and backed by a temporary file after that budget is exceeded.
SharedSpillReader
Reader for a SharedSpill. Independent readers retain the shared source; a consuming reader may instead own unique in-memory batches directly.
SpillBuffer
Append-only batch buffer with an encoded-byte memory budget.
SpillDrain
Restoring iterator returned by SpillBuffer::drain.
SpillReader
Repeatable, non-consuming batch reader returned by SpillBuffer::reader.
SpillRows
Physical-row flattening adapter for SpillReader and SpillDrain.