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

Parameter-specific evaluation in ParameterExtractor and compiled queries #19209

Open
Tracked by #18923
roji opened this issue Dec 6, 2019 · 3 comments
Open
Tracked by #18923

Parameter-specific evaluation in ParameterExtractor and compiled queries #19209

roji opened this issue Dec 6, 2019 · 3 comments

Comments

@roji
Copy link
Member

roji commented Dec 6, 2019

When executing normal queries, ParameterExtractor is invoked every time, and performs evaluations on parameters. However, with compiled queries the ParameterExtractor is invoked only once, so these evaluations do not take place. This raises some questions:

  • Do we have any code in the pipeline which assumes evaluations have taken place? If so, queries would succeed when executed normally but fail as compiled queries.
  • At least in theory, the lack of evaluation in compiled queries could make them slower than normal queries. We could make client-side evaluation for compiled queries work by having ParameterExtractor register evaluations as lambdas to be invoked each time a query is executed.

Originally discussed in #19189 (comment)

@smitpatel
Copy link
Contributor

We could make client-side evaluation for compiled queries work by having ParameterExtractor register evaluations as lambdas to be invoked each time a query is executed.

That is what true funcletizer is.

@roji
Copy link
Member Author

roji commented Dec 6, 2019

I guess I finally figured it out then :)

@ajcvickers ajcvickers added this to the Backlog milestone Dec 6, 2019
@smitpatel
Copy link
Contributor

This would also enable using properties over DbContext inside query.

smitpatel added a commit that referenced this issue Feb 8, 2020
Resolves #19322

Also block evaluation of DbContext inside Parameter extractor. It would throw exception rather than using first time context value every time (which would be incorrect results) till true funcletizer is implemented in #19209
smitpatel added a commit that referenced this issue Feb 8, 2020
Resolves #19322

Also block evaluation of DbContext inside Parameter extractor. It would throw exception rather than using first time context value every time (which would be incorrect results) till true funcletizer is implemented in #19209
smitpatel added a commit that referenced this issue Feb 8, 2020
Resolves #19322

Also block evaluation of DbContext inside Parameter extractor. It would throw exception rather than using first time context value every time (which would be incorrect results) till true funcletizer is implemented in #19209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants