Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: inject SearchConditionConvertingExpressionVisitor into ParameterValueBasedSelectExpressionOptimizer #18492

Closed
maumar opened this issue Oct 21, 2019 · 0 comments · Fixed by #18941
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@maumar
Copy link
Contributor

maumar commented Oct 21, 2019

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 or 0 = 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.

@ajcvickers ajcvickers added this to the Backlog milestone Oct 25, 2019
@maumar maumar self-assigned this Nov 8, 2019
@maumar maumar modified the milestones: Backlog, 5.0.0 Nov 14, 2019
maumar added a commit that referenced this issue Nov 16, 2019
…tor into ParameterValueBasedSelectExpressionOptimizer

Using DI to create parameter value based postprocessor, which allows for provider-specific optimizations, including SearchConditionConvertingExpressionVisitor

Resolves #18492
Resolved #18940
maumar added a commit that referenced this issue Nov 16, 2019
…tor into ParameterValueBasedSelectExpressionOptimizer

Using DI to create parameter value based postprocessor, which allows for provider-specific optimizations, including SearchConditionConvertingExpressionVisitor

Resolves #18492
Resolved #18940
maumar added a commit that referenced this issue Nov 19, 2019
…tor into ParameterValueBasedSelectExpressionOptimizer

Using DI to create parameter value based postprocessor, which allows for provider-specific optimizations, including SearchConditionConvertingExpressionVisitor

Resolves #18492
Resolved #18940
@maumar maumar closed this as completed in cb6bb76 Nov 19, 2019
@ajcvickers ajcvickers added closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. and removed consider-for-current-release labels Nov 20, 2019
@ajcvickers ajcvickers modified the milestones: 5.0.0, 5.0.0-preview1 Mar 13, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0-preview1, 5.0.0 Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
3 participants