Repository navigation
feat: translate Clamp on every range type, on 10.x (port of #486, #494) - #498
Merged
CaffeinatedCoder merged 3 commits intoOct 26, 2026
Merged
Conversation
Clamp ran as SQL only on Int32Range, Int64Range and DecimalRange, the three holds on the other ten types: ClampDomainParityTests measures each against memory over every range its factories build from points that include the element type's extremes, as a value column, a parameter and an inlined constant, exactly and in both orderings. One pairing stays in memory: a DateTime stored as timestamptz (Npgsql's default) against a DateTimeRange's tsrange. GREATEST and LEAST convert the range's bounds through the session's time zone; in a Europe/Berlin session [08:00,18:00) clamped 17:30Z to 17:00Z. Contains and the factories already fail on that pair, so Clamp now declines it too. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 6048903)
…oracles (#486) Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 521a11a)
…omain tests run alone (#486) DeclaredNullabilityTests now records the GREATEST/LEAST Clamp emits on its DateRange column; they are not pg_proc functions and skip a NULL argument. The domain tests each seed a database of their own, so they run outside the parallel batch rather than adding a dozen pools to the server's limit. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit b68b98c)
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #494
Problem
Clampruns as SQL on every range type onmainsince #486 (PR #490, merged as ac9bd90). Onrelease/10.xit ran as SQL only onInt32Range,Int64RangeandDecimalRange.Change
Cherry-picked with
-x: 6048903, 521a11a and b68b98c from PR #490.Clampon every range type, plusMixesTimeZones, which declines atimestamptzvalue against aDateTimeRange'stsrange.ClampDomainParityTests(an oracle) with the seedclamp-compares-a-timestamptz-value-through-the-session-zone, the widened clamp seed,ClampTranslationTests, the client-side-only rows, docs, and claims E31, E74 and E83.[10.4.0].DeclaredNullabilityTestsexists only onmain, so itsGREATEST/LEASTarm is left out.Tests
On EF Core 10.0.0, PostgreSQL 16 and 18: conventions, no-database EF tests and the integration suite (330 tests). On CI's newest-patch leg (EF Core 10.0.13 / Npgsql 10.0.3): the
Clamptests.tools/oracles.cs seedscatches both clamp seeds on 10.x.🤖 Generated with Claude Code