Operator Catalog

54 operator pages (53 unique AggKind variants + ema alias documented inline in ewma.md), across 7 family subdirectories.

Each operator page follows the same 9-section template (Signature / Description / Parameters / Returns / Complexity / Examples / Wire / Edge cases / See also). Renamed ops (per ADR-002) use the new Polars-convention name as filename + H1; each carries a "Previously called bv.<old>" note for searchability.

Per-entity vs global aggregation: All 53 operators work with both per-entity (@bv.table(key="user_id")) and global (@bv.table with no key=, per ADR-003) aggregation. Op semantics are identical — only the state-keying dimension differs. See docs/concepts/global-aggregation.md for when to use which.

Core (8)

Op Description
bv.count Event count over a window or lifetime.
bv.sum Sum of a numeric field.
bv.mean (renamed from bv.avg per ADR-002) Arithmetic mean of a numeric field.
bv.min Minimum value of a numeric field.
bv.max Maximum value of a numeric field.
bv.var (renamed from bv.variance per ADR-002) Sample variance via Welford.
bv.std (renamed from bv.stddev per ADR-002) Standard deviation (sqrt of variance).
bv.ratio Count matching predicate divided by total count.

Sketch (5)

Op Description
bv.n_unique (renamed from bv.count_distinct per ADR-002) HLL cardinality estimate.
bv.quantile (renamed from bv.percentile per ADR-002) DDSketch-backed quantile estimator.
bv.top_k SpaceSaving top-K most-frequent values.
bv.bloom_member Bloom-filter ever-seen membership test.
bv.entropy Shannon entropy over categorical distribution.

Point / ordinal (5)

Op Description
bv.first First observed value.
bv.last Most recent value by arrival order.
bv.first_n First N values.
bv.last_n Last N values.
bv.lag Value n events ago.

Recency (10)

Op Description
bv.first_seen First-seen server arrival timestamp.
bv.last_seen Last-seen server arrival timestamp.
bv.age Milliseconds since first_seen.
bv.has_seen Boolean ever-matched predicate.
bv.time_since Milliseconds since last matching event.
bv.time_since_last_n Milliseconds since kth most recent matching event.
bv.streak Length of current consecutive matching streak.
bv.max_streak Longest streak length ever observed.
bv.negative_streak Length of current consecutive non-matching streak.
bv.first_seen_in_window Bloom + timestamp: is this value new in window N?

Decay (6)

Op Description
bv.ewma Exponentially-weighted moving average.
bv.ewvar Exponentially-weighted variance.
bv.ew_zscore Current event z-score against EWMA/EWVar baseline.
bv.decayed_sum Forward-decay sum (Cormode).
bv.decayed_count Forward-decay count.
bv.twa Time-weighted average.

Velocity (9)

Op Description
bv.rate_of_change Rate or acceleration delta across two adjacent windows.
bv.inter_arrival_stats Mean / stddev / CV of gaps between matching events.
bv.burst_count Max events in any sub-window inside outer window.
bv.delta_from_prev Current value minus previous event value.
bv.trend Slope of EW linear regression.
bv.trend_residual Current value minus trend-predicted value.
bv.outlier_count Count of events beyond N-sigma in window.
bv.value_change_count Count of field value flips.
bv.z_score Entity-level z-score against rolling mean/stddev baseline.

Bounded buffer + geo (11)

Op Description
bv.histogram Count per fixed bucket.
bv.hour_of_day_histogram 24-bin count histogram per entity.
bv.dow_hour_histogram 168-bin (day x hour) histogram per entity.
bv.seasonal_deviation Z-score against this entity's hour-of-day baseline.
bv.event_type_mix Proportion per category over window.
bv.most_recent_n Deque of N most-recent values.
bv.reservoir_sample Uniform K-sample over all history.
bv.geo_velocity Max implied km/h between consecutive events.
bv.geo_distance Total path length in window.
bv.geo_spread Max distance from mean center.
bv.distance_from_home Distance from running centroid of top-K frequent locations.

Aliases

  • bv.ema is an alias of bv.ewma — documented inline on the ewma page (same AggKind::Ewma variant; 53 unique kinds + 1 alias = 54 page paths).

Cost-class metadata

  • See cost-class.md for per-op CPU tier (Tier 1 / Tier 2 / Tier 3) — alive Phase 19.2 metadata, cross-linked from each op page's Complexity section.

See also