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: Join/GroupJoin where key selectors are qsres or navigations fails during compilation #11288

Closed
maumar opened this issue Mar 15, 2018 · 1 comment
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@maumar
Copy link
Contributor

maumar commented Mar 15, 2018

Examples using GearsOfWar model:

from w1 in ctx.Weapons
join w2 in ctx.Weapons on w1 equals w2
select new { Name1 = w1.Name, Name2 = w2.Name }
from w in ctx.Weapons
join s in ctx.Squads on w.Owner.Squad equals s into grouping
from s in grouping.DefaultIfEmpty()
select new { WeaponName = w.Name, SquadName = s.Name }

If the qsre references entity, we can compare keys instead of entities themselves.

@maumar maumar self-assigned this Mar 15, 2018
@maumar maumar added this to the 2.1.0 milestone Mar 15, 2018
maumar added a commit that referenced this issue Mar 15, 2018
#11288 - Query: Join/GroupJoin where key selectors are qsres or navigations fails during compilation
#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 added a commit that referenced this issue Mar 15, 2018
#11288 - Query: Join/GroupJoin where key selectors are qsres or navigations fails during compilation
#10974 - Query: Include Collection group by reference throws exception
#11245 - Query: compilation error for queries with join where the inner key is navigation
#9481 - EF Core joining on the wrong field when using GroupBy

- 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 added a commit that referenced this issue Mar 16, 2018
#11288 - Query: Join/GroupJoin where key selectors are qsres or navigations fails during compilation
#10974 - Query: Include Collection group by reference throws exception
#11245 - Query: compilation error for queries with join where the inner key is navigation
#11022 - Query: GroupJoin with a complex join key fails during compilation
#9481 - EF Core joining on the wrong field when using GroupBy

- 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 for materialization query sources coming from subquery join keys.
maumar added a commit that referenced this issue Mar 19, 2018
#11288 - Query: Join/GroupJoin where key selectors are qsres or navigations fails during compilation
#10974 - Query: Include Collection group by reference throws exception
#11245 - Query: compilation error for queries with join where the inner key is navigation
#11022 - Query: GroupJoin with a complex join key fails during compilation
#9481 - EF Core joining on the wrong field when using GroupBy

- 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 for materialization query sources coming from subquery join keys.
maumar added a commit that referenced this issue Mar 20, 2018
#11288 - Query: Join/GroupJoin where key selectors are qsres or navigations fails during compilation
#10974 - Query: Include Collection group by reference throws exception
#11245 - Query: compilation error for queries with join where the inner key is navigation
#11022 - Query: GroupJoin with a complex join key fails during compilation
#9481 - EF Core joining on the wrong field when using GroupBy

- 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 for materialization query sources coming from subquery join keys.
maumar added a commit that referenced this issue Mar 20, 2018
#11288 - Query: Join/GroupJoin where key selectors are qsres or navigations fails during compilation
#10974 - Query: Include Collection group by reference throws exception
#11245 - Query: compilation error for queries with join where the inner key is navigation
#11022 - Query: GroupJoin with a complex join key fails during compilation
#9481 - EF Core joining on the wrong field when using GroupBy

- 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 for materialization query sources coming from subquery join keys.
@maumar
Copy link
Contributor Author

maumar commented Mar 20, 2018

fixed in fdb8ece

@maumar maumar closed this as completed Mar 20, 2018
@maumar maumar added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Mar 20, 2018
@ajcvickers ajcvickers modified the milestones: 2.1.0-preview2, 2.1.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

2 participants