Skip to main content

fused_publish_grid

Function fused_publish_grid 

Source
fn fused_publish_grid(
    root: &NativeNode,
    statement_grid: &Arc<EvalGrid>,
) -> Arc<EvalGrid> ⓘ
Expand description

The grid one FusedSeries publishes on: the grid its root declares it produces, or the statement’s grid when the root declares none.

A root that produces one value per grid point says which grid that is, and that declared grid is the one its consumer reads it on: a window over an evaluated input - a subquery - produces on the window’s own output grid, and a non-window root inside such a window, like the Map an expression of a subquery compiles to, produces on the subquery’s grid rather than on the statement’s. A statement root declares the statement’s grid, so the two agree there. A root with no declared grid - raw samples - is read where it was scanned and keeps the caller’s grid. Every lowering path binds the effective grid (the subquery’s child grid for a matrix root, the statement’s grid otherwise), so a window root answers that same grid here.