Repository navigation
feat: translate value set Union, Add, Intersect and Except canonically, on 10.x (port of #478, #481) - #482
Merged
CaffeinatedCoder merged 4 commits intoOct 26, 2026
Conversation
…y for the non-text families (#478) For every family PostgreSQL sorts as memory does, the translator emits a placeholder per operation inside the NULL-over-NULL CASE, and the SQL guard builds it after EF Core's alias pass: ARRAY((SELECT DISTINCT ON (x) x FROM unnest(...) WITH ORDINALITY ... WHERE x IS NOT NULL ORDER BY x, ordinality)), or the multiset form under @>, <@, &&, IsEmpty, a null test and the outermost projection. Text keeps array_cat and the refusals (#479). Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit e5be805)
#478) CanonicalSetOperationParityTests runs Union, Add, Intersect and Except over every pair of subsets of three probes for every family but text, stored canonical, out of order and twice, and with a NULL element, under ==, Count, ExecuteUpdate, the projection, containment and IsEmpty; and the copy of a value kept, for decimals by scale and floats by the sign of zero. The seed canonical-set-keeps-any-copy (a plain DISTINCT) is caught by it. CanonicalSetCompositionTests runs the compositions text still refuses, and the NULL-operand parity covers the new operations. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 571e82c)
…ut text (#478) The EF guide, the value sets guide, getting started and the four package READMEs say where the operations now run, that equal values keep the first copy, what a NULL element another tool stored does, and that a wrapper's CompareTo must order as its underlying type does. AGENTS.md narrows the array_cat rule to text and adds the rule for canonical form; claims E17-E20, E35 and E75 follow, E78-E82 are new; the translation inventory and three changelogs record the change. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit c2946fa)
…et rewrites (#478) Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 18c264f)
This was referenced Oct 26, 2026
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 #481
Port of #478 (PR #480, merged into
mainas 46c31df) torelease/10.x, for 10.4.0 (#472). Fixed only on this branch, so #481 is closed by hand after the merge.Problem
On this line
Intersect,ExceptandAddon value sets run in memory only, and aUnionisarray_cat, refused under equality,Count,GroupBy,Distinct,OrderBy, set operations,INandExecuteUpdatefor every family.Change
-x) of the four commits of feat: translate value set Union, Add, Intersect and Except canonically for every family but text (#478) #480:04505a2← e5be805:ISetTypeDefinition.CanonicalizesInSql, the placeholders inValueSetsMethodCallTranslator,ValueSetSqlGuard.CanonicalExpander, and the translation tests.0550e39← 571e82c:CanonicalSetOperationParityTests(an oracle, with the seedcanonical-set-keeps-any-copy),CanonicalSetCompositionTests, and the NULL-operand parity extended to the four operations.e182a6f← c2946fa: the docs, AGENTS.md, claims E17–E20, E35, E75 and E78–E82,translation-support.jsonand the changelogs.da0aad5← 18c264f:Addbinds a Coptic-calendar element as the set stores it.ValueRangesParameterBasedSqlProcessorFactory: this line'sEmptyCollectionRewriter.Rewritetakes the type mapping source too; both arguments are kept.sql-processor-reuses-its-first-output.patchdoesn't exist here (its oracle,RepeatedExecutionProbeTests, ismain's), so its regeneration is dropped.[10.4.0]here, instead ofmain's[11.0.0-preview.1]. In the EF Core and EF Core NodaTime changelogs they replace "No change in this package."main's edit to aFixedline of the unreleased preview has no counterpart here, and no released section changes.Tests
Run on
release/10.xwith SDK 10.0.403 and EF Core 10.0.0:CanonicalSetOperationParityTests,CanonicalSetCompositionTests,ValueSetNullOperandParityTestsandTranslationSupportProbeTests. All passed.TheFirstCopyOfEachValue_IsKept_AsInMemoryfails with 12 rows,DecimalSetandDecimalSet<Money>keeping1.00where memory keeps1.0.🤖 Generated with Claude Code