Skip to main content

Module spill

Module spill 

Source
Expand description

Spill-to-disk infrastructure for blocking operators.

Provides:

  • SpillConfig / SpillManager: temp-file lifecycle management
  • SpilledRun / RunWriter / RunReader: the single spill file format — columnar v2 run (LRSC): versioned header, schema fingerprint, per-section checksums, optional per-section zstd body (columns are contiguous postcard-encoded value slices, one section per column group)
  • HashPartitionSpiller: per-partition run writers
  • DiskQuota: separate disk usage tracking for spill operations

Structs§

DiskQuota
Tracks disk space used by spill operations for a single query.
HashPartitionConfig
Configuration for hash-based partition spill.
HashPartitionSpiller
A partition spill writer that routes rows by hash into separate files.
RunHeader
Header for a columnar spill run file.
RunReader
Reads a columnar run file back, validating the header (magic, version, checksum) on open and each section frame (checksum) on decode.
RunWriter
Writes a columnar run to disk with a versioned header, schema fingerprint, and per-section checksums.
SpillConfig
Configuration for disk spill behavior.
SpillManager
Manages spill-file creation, cleanup, and tracking for one query execution.
SpilledRun
Metadata for a single spill run file (sorted spill).

Enums§

RunCompression
Compression marker stored per section frame.

Constants§

COLLECTOR_RUN_ROWS_MAX
Maximum rows per terminal-collector run file. Bounds both the writer-side body buffer and the reader-side full-run load peak.
COLLECTOR_SPILL_ROWS_DEFAULT
Default terminal-collector spill threshold in logical rows.
HASH_JOIN_MAX_DEPTH
Maximum Grace Hash Join repartition depth.
HASH_JOIN_PARTITIONS_DEFAULT
Default Grace Hash Join partition count.
HASH_PARTITION_SEED
HASH_PARTITION_VERSION
Fixed hash algorithm for partition spill operations.

Functions§

finalize_partitions_with_runtime
Finalize a partition spiller through the runtime’s spill manager.
hash_bytes_partition
Compute the partition index for pre-serialized key bytes.
hash_column_partition
Compute one partition index per batch row over a column subset.
hash_row_partition
Compute the partition index for a row of values.
schema_fingerprint
Schema fingerprint for a run file: FNV-style hash over column names.