package granary

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Aggregate.MakeSource

Make (S) builds an incremental grouped-aggregate operator for spec S.

Parameters

module S : SPEC

Signature

Sourcetype t

A stateful aggregate operator: per-group running totals plus the materialized output relation.

Sourceval create : unit -> t

A fresh operator with no groups.

Sourceval step : t -> S.In.t -> S.Out.t

step t delta folds the input delta into the per-group totals and returns the output delta (retract/insert of changed group rows), also folding it into output.

Sourceval output : t -> S.Out.t

The current materialized (group, value) relation.