Repository navigation
[10.0] Fix byte-array projections from JSON collections - #4073
Merged
Merged
Conversation
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.
Fixes #3566.
Backports the complete merged change from #4067 (c1ac3e1) to
hotfix/10.0.4, including the complex-mapping regression and final visitor comments.Extract affected
json_to_recordset/jsonb_to_recordsetbinary fields astextand rewrite their references todecode(column, 'base64'), preserving the binary type mapping. The production fix is unchanged from main and runs after relational postprocessing, keeping the generated SQL flat without wrapper subqueries.EF10 has no
JsonTranslationsNpgsqlTest, so adapt the regression to its existingAdHocJsonQueryNpgsqlTestsuite. Cover complex JSON collections with bothjsonandjsonb, sync/async execution, exact bytes[0, 1, 127, 128, 255], empty arrays, null values, full-document materialization, collection projection, server-side equality, and exact SQL assertions. No dependency changes.Validation against a dedicated PostgreSQL 18 container:
Related upstream reference: dotnet/efcore#33440, the sibling SQL Server scalar fix rather than shared EF code replacing this PostgreSQL patch.