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: Remove EntityQueryableExpressionVisitor and integrate function… #16299

Merged
merged 2 commits into from
Jun 27, 2019

Conversation

smitpatel
Copy link
Contributor

…ality in QueryableMethodTranslatingVisitor

Issue:
We did 2 pass in ExpressionTree to convert entityQueryables to shapedQueries and then translate/compose over them.
Since we mutate the ShapedQueryExpression.QueryExpression in place,
(reference to query expression are in shaper expression so it is not easy to make it immutable)
if we try to translate something and fail then there is no way for us to try translating smaller part since we already mutated the ET.
By integrating functionality in translation pipeline, if we fail to translate, our initial expression would still be intact (since it does not contain shapedQuery

This is required for supporting collections/single non-scalar in projection.

@smitpatel smitpatel requested review from maumar, ajcvickers and roji June 27, 2019 16:03
…ality in QueryableMethodTranslatingVisitor

Issue:
We did 2 pass in ExpressionTree to convert entityQueryables to shapedQueries and then translate/compose over them.
Since we mutate the ShapedQueryExpression.QueryExpression in place,
(reference to query expression are in shaper expression so it is not easy to make it immutable)
if we try to translate something and fail then there is no way for us to try translating smaller part since we already mutated the ET.
By integrating functionality in translation pipeline, if we fail to translate, our initial expression would still be intact (since it does not contain shapedQuery

This is required for supporting collections/single non-scalar in projection.
Except for the subquery case
This visitor should only translate methods on Queryable so it should not do base eval for others.
All other methods should be passed through SqlTranslator (as they appear inside a lambda)
For subquery, we don't want to throw since we don't know if the subquery has client methods or not (projection case)
This is required for supporting collections/single non-scalar in projection.
@smitpatel smitpatel merged commit 8c547e2 into master Jun 27, 2019
@smitpatel smitpatel deleted the smit/removeeqt branch June 27, 2019 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants