You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RangeAgg and RangeIntersectAgg over a sequence of RangeSet (range_agg / range_intersect_agg on multiranges) #93
PostgreSQL declares both aggregates twice: range_agg(anyrange) → anymultirange and range_agg(anymultirange) → anymultirange; range_intersect_agg(anyrange) → anyrange and range_intersect_agg(anymultirange) → anymultirange (pg_proc, 17.11 and 18.4; docs §9.21). The library has only the range-sourced overloads (RangeAggregateExtensions, NodaTimeRangeAggregateExtensions), and ValueRangesAggregateMethodCallTranslator keys on the return type, so a sequence of RangeSet has nothing to call.
Proposed API: IEnumerable<RangeSet<TRange, T>>.RangeAgg() → RangeSet<TRange, T> (the union of all sets) and IEnumerable<RangeSet<TRange, T>>.RangeIntersectAgg() → RangeSet<TRange, T>? (null for an empty source, as the range form does), one overload per range type as the existing ones are written, in core and the NodaTime satellite.
Translation: range_agg(m) and range_intersect_agg(m) inside a GroupBy projection, with the multirange type mapping on both sides.
Done when: both aggregates run over a RangeSet column in a live test next to the existing range_agg test, and docs/ranges.md#aggregate-a-sequence-of-ranges says they take sets too.
Found by the PostgreSQL catalogue sweep (pg_proc over anymultirange), 2026-10-17.
Activity