Repository navigation
[8.0] Fix byte-array projections from JSON collections - #4075
Merged
Merged
Conversation
Backport #4067 using EF8 table identities and owning selects to decode base64 recordset fields without wrapper subqueries. Add owned-JSON regression coverage, including correlated references. Fixes #3566 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c8a1b67d-06d1-4128-b3e6-3679f8634267
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 #4067 (merged commit c1ac3e1).
Fixes #3566.
Extract binary fields from
json_to_recordset/jsonb_to_recordsetastextand decode their base64 representation after relational projection application. Rewrite projections, predicates, and correlated references while retaining the original binary mapping and flat SQL; scalar JSON decoding is unchanged.EF8 adaptations:
SelectExpressions to create EF8 column expressions, rather than relying on newer alias/column APIs.ToJsoncollection mapping in the existing shared JSON fixture. EF8 hardcodes owned JSON containers to the defaultjsonbmapping and has no supportedjsoncolumn-type configuration API, so functional coverage is intentionally limited tojsonb.Regression coverage checks sync/async full-document materialization against collection projections for
[0, 1, 127, 128, 255], empty arrays, and null, plus server-side binary equality and correlated references. SQL baselines confirm text extraction anddecodewithout wrapper subqueries.Validation on pinned EF Core 8.0.32 and an isolated PostgreSQL 18.4 instance: both new cases reproduced the incorrect base64-text bytes before the fix; the shared JSON query and ad-hoc JSON suites pass afterward (441 passed, 11 existing skips).
Targets
hotfix/8.0.12.