Skip to content

[8.0] Preserve array element converters with explicit column types - #4013

Merged
roji merged 2 commits into
hotfix/8.0.12from
roji-array-converter-backport-8-0
Oct 18, 2026
Merged

roji merged 2 commits into
hotfix/8.0.12from
roji-array-converter-backport-8-0

Conversation

@roji

@roji roji commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Backport of #4007 (9357929), including the JSON mapping correction from #4011 (842f9cd).

Preserve configured element converters for explicitly typed primitive arrays while retaining explicit column-type precedence. Includes the original regression coverage and expanded rationale comment; adapts the Contains SQL assertion to 8.0's @> ARRAY[...] translation and retains the branch's nullable annotation.

Compose converters over the JSON reader/writer selected for the explicit element store type rather than restoring the inferred writer. This fixes the JSON query/update fixture failures for timestamp arrays. Added serialization regression cases with and without an element converter; both reproduced the failure before the correction.

Validation with SDK 8.0.425 and local PostgreSQL 18.4:

  • NpgsqlTypeMappingSourceTest: 88 passed.
  • Combined JSON query/update, ad-hoc JSON query and converter suites: 724 passed, 12 existing skipped tests.

Fixes #3636

Backport #4007 to hotfix/8.0.12. Preserve configured array element converters and explicit array store-type precedence. Adapt the regression SQL assertion to the 8.0 Contains translation.

(cherry picked from commit 9357929)

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 79697333-2969-4518-b96e-46fe5fcb07c3
Compose converters over the JSON reader/writer selected for the explicit element store type instead of restoring the inferred writer. Cover timestamp array JSON serialization with and without an element converter.

(cherry picked from commit 842f9cd)

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 79697333-2969-4518-b96e-46fe5fcb07c3
@roji
roji merged commit 71ad83e into hotfix/8.0.12 Oct 18, 2026
9 checks passed
@roji
roji deleted the roji-array-converter-backport-8-0 branch October 18, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ElementType().HasConversion() ignored when calling HasColumnType on PrimitiveCollection

1 participant