Skip to content

docs: ordering by a bound puts the rows without it where PostgreSQL puts NULLs (10.x, port of #359) - #374

Merged
CaffeinatedCoder merged 2 commits into
release/10.xfrom
docs/364-bound-ordering-10.x
Oct 24, 2026
Merged

CaffeinatedCoder merged 2 commits into
release/10.xfrom
docs/364-bound-ordering-10.x

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #364

The 10.x port of #359 for 10.2.0 (#358): git cherry-pick -x of #372's commit (0fc386f), merged into main. Stacked on the #357 port, because both write the [10.2.0] changelog sections and claims.json. Merge that first; GitHub then retargets this PR to release/10.x. #364 is closed by hand after the merge.

Problem

The 10.x docs have the same gap as #359. docs/ranges.md#sort-ranges documents PostgreSQL's NULLS LAST against memory's null-first for a nullable column, but not for an ordering by a bound, where the NULLs appear on a required column too. Four examples order by LowerBound() with no word about it.

Change

Docs, a test and a seed, as on main:

Tests

Local, SDK 10.0.402, Docker:

  • Conventions: 408/408.
  • ExecutedQueryTests: 17/17 on postgres:16-alpine and postgres:18-alpine on the EF Core 10.0.0 floor, and on EF Core 10.0.13 with Npgsql 10.0.3.
  • Seed: dotnet run tools/oracles.cs seeds bound-declared on this branch reports it caught, 2 of 17 failing, among them the new ordering test.

🤖 Generated with Claude Code

…uts NULLs (#359)

docs/ranges.md#sort-ranges documents PostgreSQL's NULLS LAST against memory's
null-first for a nullable column, but not for an ordering by a bound, where the
NULLs come from non-null ranges and so appear on a required column too, and the
README, the EF Core README, docs/efcore.md and getting-started.md all show
OrderBy(b => b.Period.LowerBound()) as their ordering example.

docs/efcore.md gets a Good to know bullet with the placement (last ascending,
first descending) and the two ways to sort otherwise: a Bound() != null key in
front gives memory's order, ordering by the range gives the range order. The
ranges.md bullet and the four examples point there. Claim E72.

ExecutedQueryTests.OrderingByABound_PutsTheRowsWithoutItWherePostgresPutsNulls
orders a range and a multirange column of every shape by each bound in both
directions and asserts the documented placement and the keyed order. The seed
bound-declared-null-only-for-a-null-argument.patch (#349 reverted) is caught by
it and by the bound sweep.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0fc386f)
@CaffeinatedCoder CaffeinatedCoder added this to the 10.2.0 milestone Oct 24, 2026
@CaffeinatedCoder CaffeinatedCoder added documentation Improvements or additions to documentation area/ranges Range unions, variants and the shape engines area/range-set RangeSet and multirange algebra package/efcore Affects CodoMetis.ValueRanges.EFCore.PostgreSQL package/efcore-nodatime Affects CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTime stacked Base is another open PR; merge in order, CI does not run until it targets main labels Oct 24, 2026
Base automatically changed from fix/357-null-predicates-10.x to release/10.x October 24, 2026 16:44
@CaffeinatedCoder CaffeinatedCoder removed the stacked Base is another open PR; merge in order, CI does not run until it targets main label Oct 24, 2026
@CaffeinatedCoder
CaffeinatedCoder merged commit fb9aeed into release/10.x Oct 24, 2026
10 checks passed
@CaffeinatedCoder
CaffeinatedCoder deleted the docs/364-bound-ordering-10.x branch October 24, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/range-set RangeSet and multirange algebra area/ranges Range unions, variants and the shape engines documentation Improvements or additions to documentation package/efcore Affects CodoMetis.ValueRanges.EFCore.PostgreSQL package/efcore-nodatime Affects CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant