Repository navigation
Open
Labels
area/range-setRangeSet and multirange algebraarea/rangesRange unions, variants and the shape enginesarea/value-setsValue set families and wrapper aritiesenhancementNew feature or requestpackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQL
Description
Problem
#402 showed that several in-memory operations could be translated with composed SQL. Measured on PostgreSQL 16, feasibility only:
- Enumeration:
Values(),Values(step),Split.ARRAY(SELECT generate_series(…))is one value. - Bridge conversions:
ToInt32Set()and the others, from a multirange to a value set, by enumeration. The other direction,ToRangeSet()from a value set, moved to Translate ToRangeSet() from Int32Set, Int64Set, DateSet, LocalDateSet and YearMonthSet (split from #407) #487 on 2026-10-26: it needs no enumeration (range_aggover one-element ranges), so it doesn't share this batch's problems.
They are deliberately not in 10.3.0 (#408), which takes the scalar translations first (#405, #406, #191). This issue holds them as a separate batch.
Value set Intersect, Except and Add were in this batch until 2026-10-26. They moved to #478, which establishes canonical form in SQL for the non-text families instead of filtering the left array. The string-backed families wait on the order decision in #479.
What each one needs beyond feasibility
- Enumeration: bounded input (an unbounded range throws in memory), size (one element per step), and a collection result EF Core can read.
- Bridges (Translate ToRangeSet() from Int32Set, Int64Set, DateSet, LocalDateSet and YearMonthSet (split from #407) #487 has the set-to-multirange direction and its measurements): the element type's extremes (
[2147483647,2147483647]can't be built asint4range), the empty input (range_aggover no rows is NULL, memory's is empty), and the reverse direction's enumeration. A bridge into a value set returns a value set, so it uses Translate value set Intersect, Except, Add and a canonical Union for the non-text families with composed SQL #478's canonicalizing expression. - Related: Translate enumeration of a multirange column: Count, Any, All, SelectMany over a RangeSet (unnest) #94 (enumerating a multirange column) and Translate element-wise predicates over a value set column: Any, All, SelectMany (unnest) #95 (element-wise predicates over a value set column) need the same
unnestmachinery.
Done when
Split into one issue per family when it's scheduled. Each meets the parity list on the release epic that takes it (as #408 states it for 10.3.0).
Metadata
Metadata
Assignees
Labels
area/range-setRangeSet and multirange algebraarea/rangesRange unions, variants and the shape enginesarea/value-setsValue set families and wrapper aritiesenhancementNew feature or requestpackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQL
Activity
[-]Translate enumeration, the bridge conversions and value set Intersect/Except — a batch after 10.3.0[/-][+]Translate enumeration and the bridge conversions — a batch after 10.3.0[/+]