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

Only 1 entity materalized although generated SQL returns more rows #16165

Closed
roji opened this issue Jun 19, 2019 · 2 comments · Fixed by #16249 or #16339
Closed

Only 1 entity materalized although generated SQL returns more rows #16165

roji opened this issue Jun 19, 2019 · 2 comments · Fixed by #16249 or #16339
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

@roji
Copy link
Member

roji commented Jun 19, 2019

While working on set operations, I ran into a situation where generated SQL properly fetches 7 customers, but only one gets materialized. This can be reproduce with test Union_Include from https://github.com/roji/EntityFrameworkCore/tree/StateOfTheUnion.

Related to #15611 which generally tracks materialization.

/cc @maumar who already did some investigation on this.

@roji roji added the type-bug label Jun 19, 2019
@smitpatel
Copy link
Contributor

outer key selector is busted.

@divega divega added this to the 3.0.0 milestone Jun 20, 2019
@roji
Copy link
Member Author

roji commented Jun 25, 2019

This went away in the new implementation of the nav expanding support for set operations (probably because there's no attempt to not terminate).

roji added a commit to roji/efcore that referenced this issue Jun 25, 2019
* Include/nav rewriting is now supported.
* We now push down to subquery when OrderBy, Take or Skip are applied to set operations, to avoid using the hack where ColumnExpression with no table alias was used. dotnet#16244 was opened to track for post-3.0.
* Added missing support for union over subselect projection mappings.
* Added Other type to SetOperationType so that providers can define extra set operations (e.g. PostgreSQL `INTERSECT ALL`, `EXCEPT ALL`).

Completes dotnet#6812
Fixes dotnet#13196
Fixes dotnet#16065
Fixes dotnet#16165
roji added a commit that referenced this issue Jun 25, 2019
* Include/nav rewriting is now supported.
* We now push down to subquery when OrderBy, Take or Skip are applied to set operations, to avoid using the hack where ColumnExpression with no table alias was used. #16244 was opened to track for post-3.0.
* Added missing support for union over subselect projection mappings.
* Added Other type to SetOperationType so that providers can define extra set operations (e.g. PostgreSQL `INTERSECT ALL`, `EXCEPT ALL`).

Completes #6812
Fixes #13196
Fixes #16065
Fixes #16165
roji added a commit to roji/efcore that referenced this issue Jun 26, 2019
* Include/nav rewriting is now supported.
* We now push down to subquery when OrderBy, Take or Skip are applied to set operations, to avoid using the hack where ColumnExpression with no table alias was used. dotnet#16244 was opened to track for post-3.0.
* Added missing support for union over subselect projection mappings.
* Added Other type to SetOperationType so that providers can define extra set operations (e.g. PostgreSQL `INTERSECT ALL`, `EXCEPT ALL`).

Completes dotnet#6812
Fixes dotnet#13196
Fixes dotnet#16065
Fixes dotnet#16165
roji added a commit to roji/efcore that referenced this issue Jun 27, 2019
* Include/nav rewriting is now supported.
* We now push down to subquery when OrderBy, Take or Skip are applied to set operations, to avoid using the hack where ColumnExpression with no table alias was used. dotnet#16244 was opened to track for post-3.0.
* Added missing support for union over subselect projection mappings.
* Added Other type to SetOperationType so that providers can define extra set operations (e.g. PostgreSQL `INTERSECT ALL`, `EXCEPT ALL`).

Completes dotnet#6812
Fixes dotnet#13196
Fixes dotnet#16065
Fixes dotnet#16165
roji added a commit that referenced this issue Jun 27, 2019
* Include/nav rewriting is now supported.
* We now push down to subquery when OrderBy, Take or Skip are applied to set operations, to avoid using the hack where ColumnExpression with no table alias was used. #16244 was opened to track for post-3.0.
* Added missing support for union over subselect projection mappings.
* Added Other type to SetOperationType so that providers can define extra set operations (e.g. PostgreSQL `INTERSECT ALL`, `EXCEPT ALL`).

Completes #6812
Fixes #13196
Fixes #16065
Fixes #16165
roji added a commit to roji/efcore that referenced this issue Jun 27, 2019
* Include/nav rewriting is now supported.
* We now push down to subquery when OrderBy, Take or Skip are applied to set operations, to avoid using the hack where ColumnExpression with no table alias was used. dotnet#16244 was opened to track for post-3.0.
* Added missing support for union over subselect projection mappings.
* Added Other type to SetOperationType so that providers can define extra set operations (e.g. PostgreSQL `INTERSECT ALL`, `EXCEPT ALL`).

Completes dotnet#6812
Fixes dotnet#13196
Fixes dotnet#16065
Fixes dotnet#16165
roji added a commit that referenced this issue Jun 27, 2019
* Include/nav rewriting is now supported.
* We now push down to subquery when OrderBy, Take or Skip are applied to set operations, to avoid using the hack where ColumnExpression with no table alias was used. #16244 was opened to track for post-3.0.
* Added missing support for union over subselect projection mappings.
* Added Other type to SetOperationType so that providers can define extra set operations (e.g. PostgreSQL `INTERSECT ALL`, `EXCEPT ALL`).

Completes #6812
Fixes #13196
Fixes #16065
Fixes #16165
roji added a commit that referenced this issue Jun 28, 2019
* Include/nav rewriting is now supported.
* We now push down to subquery when OrderBy, Take or Skip are applied to set operations, to avoid using the hack where ColumnExpression with no table alias was used. #16244 was opened to track for post-3.0.
* Added missing support for union over subselect projection mappings.
* Added Other type to SetOperationType so that providers can define extra set operations (e.g. PostgreSQL `INTERSECT ALL`, `EXCEPT ALL`).

Completes #6812
Fixes #13196
Fixes #16065
Fixes #16165
roji added a commit that referenced this issue Jun 28, 2019
roji added a commit that referenced this issue Jun 28, 2019
@ajcvickers ajcvickers reopened this Jun 28, 2019
@ajcvickers ajcvickers added propose-punt closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. query and removed propose-punt labels Jun 28, 2019
roji added a commit that referenced this issue Jul 1, 2019
roji added a commit that referenced this issue Jul 1, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview7 Jul 2, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview8 Jul 29, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview8, 3.0.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

Successfully merging a pull request may close this issue.

4 participants