Repository navigation
[8.0] Preserve array element converters with explicit column types - #4013
Merged
Merged
Conversation
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
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.
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
ContainsSQL 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.Fixes #3636