chunk_plan

module of dascore.utils source

Chunk planning over the flat patch relation.

Implements the “Chunking formalities” spec: the planner consumes the catalog’s flat relation (one row per patch: {dim}_min/max/step envelopes, _{dim}_def_key structural identity, attr columns) and produces a ChunkPlan — an outputs table (one row per output patch) plus a members table binding each output to trimmed slices of source patches. No patch data is touched; assembly happens later.

Portions of the interval/instruction math were ported from the old ChunkManager (now removed) with the spec’s adjudicated corrections applied; Spool.chunk runs on these plans.

Functions

Name Description
build_chunk_plan Build a chunk plan from a flat patch relation.
build_concat_plan Build a plan concatenating patches in order (Spool.concatenate).
build_coverage_frame Summarize how much of each cell’s span along name holds data.
build_gap_frame Report every discontinuity along name in a flat patch relation.
build_subdivision_plan Build a plan cutting each row of a relation into its own pieces.
clip_to_runs The relation with each row’s envelope narrowed to the samples it holds.
coalesce_runs Merge each output’s consecutive members cut from one patch’s runs.
grid_fits Whether an exact grid’s first and last labels are the tick bounds given.
patch_local_adjusted_envelopes Replay coordinate residuals onto relation envelopes in call order.
resolve_max_shift The seam slack, in steps, that max_shift names; None is the config’s.
stretch_coordinate The coordinate an output’s slice of its stretch’s grid labels it with.
subdivision_pieces Return the inclusive pieces each row’s cuts divide it into.
window_plan Plan each window’s piece of each row it reaches, clipped to its samples.
with_runs The relation with each row cut into its coordinate’s segments.

Classes

Name Description
ChunkPlan A materialization-free description of a chunk operation.