-
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
Generated JOIN for multiple MIN is wrong #27083
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
Servicing-approved
type-bug
Milestone
Comments
smitpatel
added a commit
that referenced
this issue
Jan 5, 2022
…up by aggregate subquery When replacing columns, we used the outer select expression which had additional joins from previous term whose aliases match tables in current join and it got updated with wrong table. The fix is to utilize the original tables when replacing columns. These column replacement is to map the columns from initial tables of group by from subquery to outer group by query. Resolves #27083
smitpatel
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Jan 5, 2022
smitpatel
added a commit
that referenced
this issue
Jan 5, 2022
…up by aggregate subquery When replacing columns, we used the outer select expression which had additional joins from previous term whose aliases match tables in current join and it got updated with wrong table. The fix is to utilize the original tables when replacing columns. These column replacement is to map the columns from initial tables of group by from subquery to outer group by query. Resolves #27083
smitpatel
added a commit
that referenced
this issue
Jan 10, 2022
…up by aggregate subquery When replacing columns, we used the outer select expression which had additional joins from previous term whose aliases match tables in current join and it got updated with wrong table. The fix is to utilize the original tables when replacing columns. These column replacement is to map the columns from initial tables of group by from subquery to outer group by query. Resolves #27083
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
Servicing-approved
type-bug
Generated JOIN for multiple MIN is wrong
When multiple
MIN
are used, the translatedON
clause of subsequent JOINs is wrongThe following query:
Is translated to:
The generated
ON
clause for"p0"
and"c0"
produces a cartesian product.See WhenGroupWithMinIsUsed_CustomerIdAndTitleMatches to reproduce
Code to reproduce
Provider and version information
EF Core version: 6.0.1
Database provider: at least Microsoft.EntityFrameworkCore.SqlServer and Microsoft.EntityFrameworkCore.Sqlite
Target framework: .NET 6.0
Operating system: All
IDE: All
The text was updated successfully, but these errors were encountered: