-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to #18916 - Query: regression in EFCore 3.1 Preview 2 and Preview…
… 3 for query with conditional expression whose element is a comparison containing null-value parameter Problem was that now we are peeking into parameter values and simplifying the queries. As a result comparisons of non-nullable expressions with null-value parameter are optimized out to a simple constant false. Sql server expects search condition in some places (e.g. WHERE, HAVING or WHEN parts of CASE statements). Before we look into parameter values we run SearchConditionConvertingExpressionVisitor which fixes those cases. However, this visitor is currently sql server specific, and the part of the pipeline that looks into parameter values is not provider specific, so we can't re-run it. Fix is to manually convert constants encountered in those areas into conditions. We used to do it already for WHERE and HAVING but we missed WHEN. Resolves #18916
- Loading branch information
Showing
3 changed files
with
119 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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