Repository navigation
[8.0] Fix array type inference for mixed collection types - #3998
Merged
Merged
Conversation
Backport #3991 while preserving EF8 materialization of concrete collection parameters. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f5bcbb58-aba3-42a7-9d17-d15e87290e52
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.
Backports #3991 (e33229a) to 8.0. Related issue: #3805.
Remap mismatched array operands only when the inferred mapping has a converter, preserving both its store type and element mapping. Parameter binding remains unchanged; explicit
int4range[]mappings stay arrays, and converter-free array/list parameters retain reference identity.8.0 adaptations: Use a small internal adapter for EF8's protected collection-mapping API and the existing primitive-collection test class. Remap only array/list and interface CLR shapes: EF8 materializes other concrete collection parameters to
List<T>before conversion, so keeping their inferred mapping preserves previously workingList<WrappedId>property + concretely typedImmutableList<WrappedId>parameter queries (covered in both operand orders).Existing limitations left unchanged: EF8 rejects read-only primitive-collection properties, including
IReadOnlyCollection<T>, so the source's read-only property cases are omitted. Array properties with concretely typed immutable/set/iterator parameters remain outside the fix; the five parameter runtime shapes are covered throughIEnumerable<T>, as in the source tests. No converter orCreateParameterchanges.Validation: Built with SDK 8.0.425. PostgreSQL 18 database testing is complete: all 15 focused regressions passed; surrounding array-array, array-list, primitive-collection and range query coverage passed with 534 tests, 7 existing skips, and 0 failures. Includes exact SQL/result assertions, explicit range arrays with a shape-only converter, and converter-free parameter reference identity.