[release/8.0] Make Contains work again over hierarchyid#31930
Merged
roji merged 1 commit intodotnet:release/8.0from Oct 3, 2023
Merged
[release/8.0] Make Contains work again over hierarchyid#31930roji merged 1 commit intodotnet:release/8.0from
roji merged 1 commit intodotnet:release/8.0from
Conversation
ErikEJ
reviewed
Oct 2, 2023
889c9d3 to
2b22b71
Compare
ajcvickers
approved these changes
Oct 2, 2023
Contributor
|
@roji This is approved by Tactics. |
|
This is still broken in some use cases. In my case with some .Includes and .AsSplitQuery(). This results to follwoing two queries. Unfortunately the second query is still using the WITH syntax. |
Member
Author
|
@IT-CASADO can you please open a new issue for this, including a minimal, runnable code sample? Then I can look at fixing that case as well. |
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 #31912
Description
The primitive collection improvements to 8.0 changed the translation of Contains to use OPENJSON with WITH, but that's incompatible with hierarchyid (SQL Server CLR type).
Customer impact
Queries which apply Contains to a parameter list of HierarchyId no longer work in 8.0.
How found
Customer reported.
Regression
Yes (when the community hierarchyid package was used)
Testing
Added.
Risk
Very low, the mechanism to transform the incompatible OPENJSON with WITH to OPENJSON without WITH already existed for other purposes; this change only extends its usage for hierarchyid.