Fix per instance nullability converter resolver info code#6435
Open
NinoFloris wants to merge 2 commits intonpgsql:mainfrom
Open
Fix per instance nullability converter resolver info code#6435NinoFloris wants to merge 2 commits intonpgsql:mainfrom
NinoFloris wants to merge 2 commits intonpgsql:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the per-instance nullability converter resolver where the unboxed type was not being properly passed to PgResolverTypeInfo. The fix ensures that typeof(Array) is specified as the unboxed type, matching the pattern used in the normal array handling code.
Changes:
- Added
unboxed type: typeof(Array)parameter toPgResolverTypeInfoconstructor inTypeInfoMapping.cs - Added comprehensive test coverage for converter resolver with different array nullability modes
- Enhanced existing timestamptz array test to verify per-instance nullability mode behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Npgsql/Internal/TypeInfoMapping.cs | Fixed missing unboxed type parameter in PgResolverTypeInfo constructor |
| test/Npgsql.Tests/Types/ArrayTests.cs | Added new test method to verify array nullability modes work correctly with converter resolvers |
| test/Npgsql.Tests/Types/DateTimeTests.cs | Enhanced existing test to verify per-instance nullability mode and reading behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
PTAL @roji |
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.
Found during work on #6314
The normal array side properly passes the unboxed type but it was missed here. Also added a test for the convert resolver case to the array tests (copy of the int array nullability test, changed to use timestamptz).