Skip to content

[8.0] Fix array type inference for mixed collection types - #3998

Merged
roji merged 1 commit into
hotfix/8.0.12from
roji-array-inference-backport-8-0
Oct 17, 2026
Merged

roji merged 1 commit into
hotfix/8.0.12from
roji-array-inference-backport-8-0

Conversation

@roji

@roji roji commented Oct 17, 2026

Copy link
Copy Markdown
Member

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 working List<WrappedId> property + concretely typed ImmutableList<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 through IEnumerable<T>, as in the source tests. No converter or CreateParameter changes.

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.

Backport #3991 while preserving EF8 materialization of concrete collection parameters.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: f5bcbb58-aba3-42a7-9d17-d15e87290e52
@roji
roji merged commit 101cb4d into hotfix/8.0.12 Oct 17, 2026
9 checks passed
@roji
roji deleted the roji-array-inference-backport-8-0 branch October 17, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant