Repository navigation
Fix geography collection length on PostGIS 3.6.4 - #4168
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Validation used a simulation rather than actual PostGIS 3.6.4, leaving the changed collection semantics unverified and their impact on older supported versions unresolved.
No open issues 🎉
What changed in this PR
Corrects the Npgsql EF Core provider’s geography collection Length translation from #4167 for PostGIS 3.6.4 so polygon perimeters are included.
Changes:
- Sum
ST_LengthandST_Perimeterfor collections, including polymorphic and measured collections, while retaining single-function translations for concrete types. - Restore expected collection lengths, update SQL baselines, and add measured-collection regression coverage.
| File | Description |
|---|---|
| test/EFCore.PG.FunctionalTests/Query/SpatialQueryNpgsqlGeographyTest.cs | Corrects expected lengths and SQL baselines; adds measured-collection coverage. |
| src/EFCore.PG.NTS/Query/ExpressionTranslators/Internal/NpgsqlNetTopologySuiteMemberTranslatorPlugin.cs | Includes polygon perimeters in geography collection length translations. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
28c4393148d7b92793fdac4de1e7c38408eb6824↑ The documentation update passed Markdown lint.
↓ Execution against actual PostGIS 3.6.4 remains unverified.
ST_Lengthexcludes collection polygon boundaries on 3.6.4.The geography collection translation merged in #4167 omits polygon perimeters on PostGIS 3.6.4, and its tests incorrectly accepted the shortened result.
Sum
ST_LengthandST_Perimeterfor collections, including polymorphic and measured collections, while retaining single-function translations for concrete types. Restore the expected collection lengths in the regression tests. This targets PostGIS's corrected behavior; older versions have different collection semantics.Document the type-dependent translations and the PostGIS 3.6.4 requirement for geography collections.
Relates to #4167