Skip to main content

Module dataflow

Module dataflow 

Source
Expand description

Build a differential-dataflow graph from compiled PlanNodes and run a whole Model to a set of computed derived-measure values.

This connects the formula compiler (compiler) to the DD substrate proven by the spike in lib.rs. Encoding is the same the spike validated:

  • DD key = serialized coordinate CoordKey = Vec<(u32,u32)>
  • DD value = f64::to_bits() as u64 (numeric measures only, v1)
  • diff R = isize; a final reduce collapses to one value per key.

Scope (v1, numeric): InputMeasure, Literal, MapUnary(Neg), MapBinary (arithmetic + comparison/logical encoded as 1.0/0.0), Join (dimension alignment), Aggregate (SUM/AVG/MIN/MAX), and scalar FuncCall built-ins (ABS/ROUND/FLOOR/CEIL/SQRT/NEG, MIN2/MAX2). Non-numeric derived values (Text/Boolean stored as such) and Date values are carried in CellValue; comparison/logical results live in the numeric lane as 1.0/0.0.

Enums§

EngineError

Functions§

evaluate
Run model to completion and return computed values for the requested derived measures: measure -> (coordinate-key -> value).