Skip to content

Conversation

@roji
Copy link
Member

@roji roji commented Sep 10, 2025

NOTE: This PR is based on top of #36730, review last commit only

Fixes #36627

Description
We added support for SQL Server 2025's JSON data type, which enhances the JSON_VALUE() support to include a RETURNING clause which types the data being extracted out of JSON documents. Unfortunately, the GUID data type specifically (uniqueidentifier) is not supported by SQL Server with the new RETURNING clause, so this PR falls back to the older typing mechanism via a CAST.

Customer impact
Without this PR, some queries involving a GUID value stored within JSON complex types fail when targeting SQL Server 2025 with the new JSON data type (mainline 10 scenario).

How found
Testing

Regression
No

Testing
Added, extended type tests to cover this.

Risk
Very low, trivial one-line change in new codepath.

@roji roji requested review from a team and artl93 September 10, 2025 18:10
@roji roji added the ask-mode label Sep 10, 2025
@artl93
Copy link
Member

artl93 commented Sep 10, 2025

Can we have a reviewer other than me?

@roji roji enabled auto-merge (squash) September 11, 2025 13:59
@roji roji merged commit e91d005 into dotnet:release/10.0 Sep 11, 2025
7 checks passed
@roji roji deleted the JsonValueGuid branch September 11, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQL Server: new JSON_VALUE() RETURNING clause is incompatible with uniqueidentifier, geometry/geography

3 participants