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

Commits on Jun 27, 2019

  1. Query: Remove EntityQueryableExpressionVisitor and integrate function…

    …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 committed Jun 27, 2019
    Configuration menu
    Copy the full SHA
    73e8dc7 View commit details
    Browse the repository at this point in the history
  2. Query: Throw for unknown method encountered in QueryableMethodTranslator

    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 committed Jun 27, 2019
    Configuration menu
    Copy the full SHA
    8c547e2 View commit details
    Browse the repository at this point in the history