Skip to main content

scalar_node

Function scalar_node 

Source
fn scalar_node(context: &Context<'_>, value: f64) -> NativeNode
Expand description

Binds value as a constant scalar on the grid of the expression being compiled.

The grid is the context’s rather than the constant’s own: a constant has no timestamps, so the only positions it can be broadcast over are the ones the expression it sits next to is evaluated at — the statement’s grid, or a subquery’s inside one. [NativeTree::validate] compares a binary operation’s two grids by spec rather than by allocation.

Nothing here can fail: the grid is the one Context already carries, so a caller needs no ?.