Fix per instance nullability converter resolver info code#6435
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.
|
PTAL @roji |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
714ae25 to
1bc1d81
Compare
(cherry picked from commit aed30af)
|
Backported to 10.0.2 via 1dda8f9 |
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 converter resolver case to the array tests (copy of the int array nullability test, changed to use timestamptz).