Skip to content

Fix SQLite queries over JSON byte arrays - #39580

Closed
emremenekse wants to merge 1 commit into
dotnet:mainfrom
emremenekse:fix/sqlite-json-byte-array
Closed

emremenekse wants to merge 1 commit into
dotnet:mainfrom
emremenekse:fix/sqlite-json-byte-array

Conversation

@emremenekse

Copy link
Copy Markdown
Contributor

SQLite extracts byte[] properties from JSON as hex text. This caused comparisons against binary values to return incorrect results and direct projections to return the bytes of the hex characters.

Decode extracted values with unhex() and bind byte[] query parameters as BLOBs. Update the predicate regression test and add projection coverage for non-empty arrays, empty arrays, and nulls.

Validation on Windows: 38,901 SQLite functional tests passed (284 skipped), 934 SQLite unit tests passed, and all four targeted SQL Server JSON predicate cases passed.

Fixes #33522.

@emremenekse
emremenekse requested a review from a team as a code owner November 9, 2026 19:21
@cincuranet cincuranet self-assigned this Nov 11, 2026
@AndriySvyryd

Copy link
Copy Markdown
Member

This is actually already fixed by #39483

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQLite: Querying on byte[] JSON property doesn't work

3 participants