[release/10.0] Fix empty scalar collection support#37248
Merged
roji merged 1 commit intodotnet:release/10.0from Dec 2, 2025
Merged
[release/10.0] Fix empty scalar collection support#37248roji merged 1 commit intodotnet:release/10.0from
roji merged 1 commit intodotnet:release/10.0from
Conversation
041244c to
d9f2109
Compare
cincuranet
approved these changes
Nov 28, 2025
AndriySvyryd
approved these changes
Dec 1, 2025
artl93
approved these changes
Dec 2, 2025
Member
artl93
left a comment
There was a problem hiding this comment.
Multiple-customer reported regression.
Member
Author
|
Servicing approved via email. |
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 #37216
Description
EF 10 made important improvements around the translation of parameterized collections (docs): when a parameter collection is used, rather than sending it as a JSON array (which resulted in performance issues), we now inline it as a set of parameters into the SQL. Unfortunately, the SQL construct for this (
VALUES) does not support empty sets, leading to a query failure when the parameterized collection is empty.Customer impact
Queries making use of parameterized collections with any LINQ operator (other than Contains) fail when that collection happens to be empty:
How found
Multiple customers reported on 10.0.0
Regression
Yes
Testing
Added
Risk
Very low, very small, targeted fix for the precise problematic case. Quirk added just in case.