Query: inject SearchConditionConvertingExpressionVisitor into ParameterValueBasedSelectExpressionOptimizer #18492
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-enhancement
Milestone
When performing optimizations in ParameterValueBasedSelectExpressionOptimizer we need to run search condition converter for SQL Server, since some of the optimizations can reduce predicate to a simple bool constant (incorrect on SQL Server).
Currently we have a workaround that performs optimizations and if the expression is a SelectExpression, peeks into its predicate to see if it was changed to SqlConstantExpression. If so, convert it to
1 = 1
or0 = 1
. This is only necessary on SQL Server but currently we do it for all providers. Once ParameterValueBasedSelectExpressionOptimizer is provided by DI we should only do it where needed.The text was updated successfully, but these errors were encountered: