Skip to content

Fix per instance nullability converter resolver info code#6435

Open
NinoFloris wants to merge 2 commits intonpgsql:mainfrom
NinoFloris:fix-per-instance-nullability-converter-resolver
Open

Fix per instance nullability converter resolver info code#6435
NinoFloris wants to merge 2 commits intonpgsql:mainfrom
NinoFloris:fix-per-instance-nullability-converter-resolver

Conversation

@NinoFloris
Copy link
Member

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).

@NinoFloris NinoFloris requested a review from roji as a code owner February 2, 2026 21:38
Copilot AI review requested due to automatic review settings February 2, 2026 21:38
@NinoFloris NinoFloris requested a review from vonzshik as a code owner February 2, 2026 21:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to PgResolverTypeInfo constructor in TypeInfoMapping.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.

@NinoFloris
Copy link
Member Author

PTAL @roji

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.

1 participant