-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: Query containing subquery with annonymous type fails to translate to server #7844
Comments
@anpete - Should we report this to Re-Linq or try to work-around on our side? |
@smitpatel @anpete this is not a problem with Re-Linq. It's just that once you moved the selector down into the subquery, the subquery now gets flagged for See: tuespetre@4933293 |
@tuespetre - Good to know that #7767 fixes this. I did not mean that this is issue in Re-Linq. Though certain an optimization which Re-Linq can expand. 3 components - ReLinq QueryParser, EF QM optimizations & EF Query translations are involved in this translation. So we can apply fix at any place. It is the same difference that instead of lifting subqueries in translation we lifted in QueryOptimizer. If Re-Linq generates more optimized QM then its good for us. If not then we improve translation logic to deal with such cases. (Exactly what you are doing in #7767. Thanks.) Just wanted to make sure that we have issue tracking the test that we should do something to enable translation to Server. |
More accurate marking of RequiresClientProjection (less false positives), which results in less duplicate visitation of child query models in many cases Fixes dotnet#7844
More accurate marking of RequiresClientProjection (less false positives), which results in less duplicate visitation of child query models in many cases Fixes dotnet#7844
More accurate marking of RequiresClientProjection (less false positives), which results in less duplicate visitation of child query models in many cases Fixes dotnet#7844
More accurate marking of RequiresClientProjection (less false positives), which results in less duplicate visitation of child query models in many cases Fixes dotnet#7844
With #7843 We introduced optimization to lift subqueries when outer QM has selector only and it can be pushed down into subquery model.
Query
generates query model from parser like this
which is being optimized into this now
Since the AdditionalFromClause has anonymous type projection, we fail to translate the whole query as cross join.
The root cause here seems to be QueryParser. Even though MainFromClause & AdditionalFromClause both have same structure, the where predicate for MainFromClause is optimized from
new { e }.e.EmployeeID
toe.EmployeeId
. While same optimization does not happen for AdditionalFromClause.The text was updated successfully, but these errors were encountered: