Expand description
A pure scalar evaluator: one formula, one value per input, no dimensions.
This is the engine’s per-cell semantics without the dataflow around it. It
calls the very operators the dataflow builder maps over its collections
(apply_binary, apply_unary, apply_scalar), so a formula evaluated
here gives the bit-identical value the engine gives at a single coordinate.
pg_improv’s LANGUAGE improv evaluates SQL function bodies with it.
Semantics:
- a
Refto a measure absent fromenvis a missing input: the result isNonewherever it depends on it (the dataflow emits no cell there); - division by zero and domain errors are
NaN(the engine’s convention); - aggregations and dimension projections (
SUM(x OVER T),x BY T) need a model with categories and are rejected withScalarError::NeedsDimensions.
Enums§
- Scalar
Error - Why a formula cannot be evaluated as a scalar.