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

Test Aggregate_over_subquery_in_group_by_projection is non-deterministic #27278

Closed
roji opened this issue Jan 25, 2022 · 0 comments · Fixed by #27280
Closed

Test Aggregate_over_subquery_in_group_by_projection is non-deterministic #27278

roji opened this issue Jan 25, 2022 · 0 comments · Fixed by #27280
Assignees
Labels
area-query area-test 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 Jan 25, 2022

var query = context
    .Set<Order>()
    .Where(someFilterFromOutside)
    .GroupBy(x => new { x.CustomerId, x.Number })
    .Select(x => new
    {
        x.Key.CustomerId,
        CustomerMinHourlyRate = context.Set<Order>().Where(n => n.CustomerId == x.Key.CustomerId).Min(h => h.HourlyRate),
        HourlyRate = x.Min(f => f.HourlyRate),
        Count = x.Count()
    });

The order of the groupings isn't defined, so this fails on PG.

@maumar maumar self-assigned this Jan 26, 2022
maumar added a commit that referenced this issue Jan 26, 2022
@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 Jan 26, 2022
@maumar maumar added this to the 7.0.0 milestone Jan 26, 2022
@ghost ghost closed this as completed in #27280 Jan 26, 2022
ghost pushed a commit that referenced this issue Jan 26, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0-preview2, 7.0.0 Nov 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query area-test 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.

3 participants