Module parquet_stream_shapes

Module parquet_stream_shapes 

Source
Expand description

Whole-stream offsets for the streaming Parquet route, and the cross-batch shape sharing that rides on them (#5407).

A streamed model is written one batch at a time, so anything that has to hold across batches lives here: the running vertex/index offsets every batch’s mesh table is based on, and, when the client opted in, where each distinct shape already landed. The cache writer and the per-batch client blob both consume a PlannedBatch, so the two can never disagree about a range.

BOUNDED MEMORY. No occurrence outlives the batch that produced it. What grows across batches is, per DISTINCT shape emitted so far, one EmittedShape (16 bytes) plus its MeshGeometryKey (24 bytes), whatever the size of that shape’s geometry; and, per instanced representation, the ONE template mesh its later occurrences are verified against, capped in total at RETAINED_TEMPLATE_BUDGET_BYTES. Past the cap a representation is simply not carried: its later occurrences are shared within their own batch, or by content hash, instead. Sharing degrades; correctness and the bound do not.

Structs§

PlannedBatch
One batch’s mesh / vertex / index tables, planned against the whole stream.
StreamShapePlanner
The running state behind a streamed model’s whole-stream offsets.

Constants§

RETAINED_TEMPLATE_BUDGET_BYTES 🔒
Ceiling on the template geometry a cross-batch stream retains (#5407).

Functions§

overflow 🔒
template_bytes 🔒
The buffers a retained template holds, in bytes.