-
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
Average_Grouped_from_LINQ_101 is non-deterministic #27155
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
4 tasks
maumar
added a commit
that referenced
this issue
Jan 25, 2022
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 25, 2022
ghost
pushed a commit
that referenced
this issue
Jan 26, 2022
@maumar this is still failing on PG, but this time because of rounding accuracy:
... because the test implementation rounds on the expected side, presumably to match SQL Server behavior: public virtual Task Average_Grouped_from_LINQ_101(bool async)
=> AssertQuery(
async,
ss => from p in ss.Set<ProductForLinq>()
group p by p.Category
into g
select new { Category = g.Key, AveragePrice = g.Average(p => p.UnitPrice) },
ss => from p in ss.Set<ProductForLinq>()
group p by p.Category
into g
select new { Category = g.Key, AveragePrice = Math.Round(g.Average(p => p.UnitPrice) - 0.0000005m, 6) },
elementSorter: e => (e.Category, e.AveragePrice)); I see that InMemory also overrides, probably because of this rounding - should we move the rounding to SQL Server rather than imposing it on all providers by default? |
ajcvickers
removed
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Jul 6, 2022
maumar
added a commit
that referenced
this issue
Aug 10, 2022
Added custom asserter that checks results within range, rather than adding sql server specific expected query Fixes #27155
maumar
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Aug 10, 2022
maumar
added a commit
that referenced
this issue
Aug 10, 2022
Added custom asserter that checks results within range, rather than adding sql server specific expected query For the second test, added proper collection asserter so we can impose the order within nested collection. Fixes #27155
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
In:
There is no entity sorter configure, so the order is non-deterministic (fails on PG).
Same with Whats_new_2021_sample_10.
The text was updated successfully, but these errors were encountered: