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

Group by bug: records are grouped on client #4701

Closed
sdanyliv opened this issue Mar 4, 2016 · 1 comment
Closed

Group by bug: records are grouped on client #4701

sdanyliv opened this issue Mar 4, 2016 · 1 comment

Comments

@sdanyliv
Copy link

sdanyliv commented Mar 4, 2016

The following unit test passes correctly but result of group by statement is calculated on client:

//Northwind

        [Test]
        [Category("Grouping")]
        public void GroupByCalculatedTest()
        {
            var result =
                from o in db.Orders
                group o by o.Freight > 50 ? o.Freight > 100 ? "expensive" : "average" : "cheap"
                into g
                select g;
            var list = result.ToList();
            Assert.AreEqual(3, list.Count);
        }

Gnerated SQL (formatted):

SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[Freight], [o].[OrderDate], 
  [o].[RequiredDate], [o].[ShipAddress], [o].[ShipCity], [o].[ShipCountry], [o].[ShipName], 
  [o].[ShipPostalCode], [o].[ShipRegion], [o].[ShipVia], [o].[ShippedDate]
FROM [Orders] AS [o]

In pessimistic case It may take all server's memory.

"EntityFramework.Core" version="7.0.0-rc1-final"
"Remotion.Linq" version="2.0.2"

@rowanmiller
Copy link
Contributor

Duplicate of #2341

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants