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

Fix to issues around entity comparisons in query #11287

Closed
wants to merge 1 commit into from
Closed

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Mar 15, 2018

#11022 - GroupJoin with an entity object as a key fails
#10974 - Query: Include Collection group by reference throws exception
#11245 - Query: compilation error for queries with join where the inner key is navigation

  • Added step to the QueryOptimizer that converts entity qsre comparison to key comparisons instead for order by join and group join,
  • Improved logic of join/groupjoin inner key navigation rewrite to correctly handle case when navigation is the final operator (i.e. no scalar is projected at the end),
  • Improved "requires materialization" logic to correctly mark qsre projected out of subquery that is a result of nav rewrite of join/groupjoin inner key.

#11022 - GroupJoin with an entity object as a key fails
#10974 - Query: Include Collection group by reference throws exception
#11245 - Query: compilation error for queries with join where the inner key is navigation

- Added step to the QueryOptimizer that converts entity qsre comparison to key comparisons instead for order by join and group join,
- Improved logic of join/groupjoin inner key navigation rewrite to correctly handle case when navigation is the final operator (i.e. no scalar is projected at the end),
- Improved "requires materialization" logic to correctly mark qsre projected out of subquery that is a result of nav rewrite of join/groupjoin inner key.
@maumar maumar requested review from anpete and smitpatel March 15, 2018 22:43
foreach (var ordering in orderByClause.Orderings)
{
if (ordering.Expression is QuerySourceReferenceExpression qsre
&& TryGetEntityPrimaryKeys(qsre.ReferencedQuerySource, out var keys))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keys name it keyProperties

@maumar
Copy link
Contributor Author

maumar commented Mar 15, 2018

closing in favor of #11289

@maumar maumar closed this Mar 15, 2018
@smitpatel smitpatel deleted the fix11022 branch March 20, 2018 20:54
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