name: op-group-rounded
description: Round each numeric value down to a multiple of `interval` (floor, not nearest) and group by that scalar.
kind: operator
category: GROUP
operator: GROUP_ROUNDED
type: reference
applies_to: process, compose, predict
examples_tags: [cohort-analysis, streaming-friendly]
Use when
Groups a number by rounding it down to a multiple of a step, such as 23 and 27 both to 20, naming each group by that multiple.
Questions it answers:
- How many orders are there at each price point, to the nearest lower 10?
- What is the count of scores in each block of 5 points?
Use something else:
GROUP_RANGEwhen you want the band’s both edges in its name.GROUP_QUANTILEwhen you want groups of equal size.
Params
| Name | Type | Default | Description |
|---|---|---|---|
interval | float | 1 | Rounding increment; the slot’s top-level interval, not params. ≤ 0 is treated as 1. |
Inputs
field — admitted types: see ## Contract; decimal128 reads as its float64 echo, packed_bool as 0/1.
Output
Floored numeric key per row. Each value rounds DOWN to a multiple of interval (19→10, -3→-10), never to the nearest; key is that scalar. Rows emit in numeric key order ("-5", "9.5", "10") on every arm (streaming, shards, fused crosstab). An explicit sort or crosstab-axis include wins; sorting the key column compares strings.
Components
precision— Rounding increment (interval)edges— Sorted rounded scalars separating bucketsbuckets—{key, low, high, count}per emission- Fans out under
ShardWorkers/DecodeWorkerswith the serial bits, whatever the key count; at very high cardinality (keys ≳ 70% of each partition’s rows) the fan-out gains nothing, which predict cannot see; passes the chain stage gate. - Eligible for the fused crosstab.
Contract
- Types (
field):date,datetime,decimal128,f32,f64,packed_bool,u16,u32,u4,u64,u8; any other scalar type isPULSE_FIELD_TYPE_UNSUPPORTED. - Weight: not read; a weight in force is skipped.
- Streaming: streamable; components
mergeable. - Components:
total_n,n_null,precision,edges,buckets.
Gotchas
- Same partition as
GROUP_RANGEat equal width; only the key differs ("10"vs"10-20"). includeongroupsis refused (PROCESSING_CONFIG) — filter the source field; a crosstab axis keeps it for order.
See
pulse_examples_search tags=[cohort-analysis]- Skills:
grouper-design,response-components,op-group-range