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

Arithmetic operations with GroupBy are not translated #15853

Closed
alexk8 opened this issue May 30, 2019 · 0 comments · Fixed by #18283
Closed

Arithmetic operations with GroupBy are not translated #15853

alexk8 opened this issue May 30, 2019 · 0 comments · Fixed by #18283
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-enhancement
Milestone

Comments

@alexk8
Copy link

alexk8 commented May 30, 2019

            var results = context.Orders
                .GroupBy(o =>  o.CustomerId)
                .Select(g => new
                {
                    CustomerId = g.Key,
                    Sum = g.Sum(o => o.Amount*o.Price),
                }).ToList();

Arithmetics are quite handy with "group by" but they are not supported (not translated to sql)
Error generated for warning 'Microsoft.EntityFrameworkCore.Query.QueryClientEvaluationWarning: The LINQ expression 'GroupBy([o].CustomerId, [o])' could not be translated and will be evaluated locally. '. This exception can be suppressed or logged by passing event ID 'RelationalEventId.QueryClientEvaluationWarning' to the 'ConfigureWarnings' method in 'DbContext.OnConfiguring' or 'AddDbContext'.
Tested on 2.1, 2.2, 3.0-preview5

@ajcvickers ajcvickers added this to the Backlog milestone May 31, 2019
@smitpatel smitpatel added the verify-fixed This issue is likely fixed in new query pipeline. label Jul 2, 2019
smitpatel added a commit that referenced this issue Jul 2, 2019
…fter GroupBy

Resolves #12826
Resolves #6658
Part of #15711
Resolves #15853
Resolves #12799
Resolves #12476
Resolves #11976

There are way too many existing issues are resolved by this PR. I haven't added regression test or verified each of them so I have put Verify-Fixed label on them for now.
smitpatel added a commit that referenced this issue Jul 2, 2019
…fter GroupBy

Resolves #12826
Resolves #6658
Part of #15711
Resolves #15853
Resolves #12799
Resolves #12476
Resolves #11976

There are way too many existing issues are resolved by this PR. I haven't added regression test or verified each of them so I have put Verify-Fixed label on them for now.
smitpatel added a commit that referenced this issue Jul 2, 2019
…fter GroupBy

Resolves #12826
Resolves #6658
Part of #15711
Resolves #15853
Resolves #12799
Resolves #12476
Resolves #11976

There are way too many existing issues are resolved by this PR. I haven't added regression test or verified each of them so I have put Verify-Fixed label on them for now.
@smitpatel smitpatel reopened this Jul 2, 2019
@ajcvickers ajcvickers modified the milestones: Backlog, 3.1.0 Sep 4, 2019
@divega divega assigned smitpatel and maumar and unassigned smitpatel and maumar Sep 11, 2019
@maumar maumar added closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. and removed verify-fixed This issue is likely fixed in new query pipeline. labels Oct 8, 2019
@maumar maumar modified the milestones: 3.1.0, 3.0.0 Oct 8, 2019
maumar added a commit that referenced this issue Oct 8, 2019
- added regression tests for #12289
- added regression tests for #15279
- added regression tests for #15938
- added regression tests for #18267

- resolves #12522
- resolves #12805
- resolves #13231
- resolves #13594
- resolves #13754
- resolves #14851
- resolves #15103
- resolves #15669
- resolves #15853
maumar added a commit that referenced this issue Oct 8, 2019
- added regression tests for #12289
- added regression tests for #15279
- added regression tests for #15938
- added regression tests for #18267

- resolves #12522
- resolves #12805
- resolves #13231
- resolves #13594
- resolves #13754
- resolves #14851
- resolves #15103
- resolves #15669
- resolves #15853
maumar added a commit that referenced this issue Oct 8, 2019
- added regression tests for #12289
- added regression tests for #15279
- added regression tests for #15938
- added regression tests for #18267

- resolves #12522
- resolves #12805
- resolves #13231
- resolves #13594
- resolves #13754
- resolves #14851
- resolves #15103
- resolves #15669
- resolves #15853
maumar added a commit that referenced this issue Oct 8, 2019
- added regression tests for #12289
- added regression tests for #15279
- added regression tests for #15938
- added regression tests for #18267

- resolves #12522
- resolves #12805
- resolves #13231
- resolves #13594
- resolves #13754
- resolves #14851
- resolves #15103
- resolves #15669
- resolves #15853
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. customer-reported type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants