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

LINQ support for Group By #1202

Open
ealsur opened this issue Feb 6, 2020 · 57 comments
Open

LINQ support for Group By #1202

ealsur opened this issue Feb 6, 2020 · 57 comments
Assignees
Labels
feature-request New feature or request LINQ QUERY

Comments

@ealsur
Copy link
Member

ealsur commented Feb 6, 2020

Capturing requirement for LINQ GroupBy support to track future progress.

@ealsur ealsur added feature-request New feature or request QUERY labels Feb 6, 2020
@ealsur ealsur added this to To do in Cosmos DB SDK team via automation Feb 6, 2020
@markjbrown
Copy link

@bchong95 bchong95 added the LINQ label May 16, 2020
@pnda489
Copy link

pnda489 commented Jul 8, 2020

Is there any ETA for this?

@valerionatangelo
Copy link

We really need an ETA on this feature.

@dan-matthews
Copy link

/bump... I've been waiting for this feature a loooong time and it seems SO close :)

@AshishMoradiya
Copy link

Waiting for group by support

@petro2050
Copy link

any update?

@joergeugster
Copy link

still waiting....?

@ealsur
Copy link
Member Author

ealsur commented Oct 27, 2020

@khdang Do you have any updates on this request?

@onionhammer
Copy link
Contributor

This would be tremendous! Are the supported operations documented somewhere or do we just figure it out by trial and error at runtime?

@fvalentiner
Copy link

It would be amazing! It's basically the only thing holding us from migrating to CosmosDB

@alexeymarkov
Copy link

Any news there?
Requesting all entities to the client and doing GROUP BY and COUNT operations at the client results in a significant higher RUs...

@bchong95 bchong95 removed the QUERY label Feb 16, 2021
@adstep
Copy link

adstep commented Mar 29, 2021

Love to see this feature supported.

@adamreed90
Copy link

Please! <3

@vengi83644
Copy link

Must needed !!!

@j82w
Copy link
Contributor

j82w commented Apr 20, 2021

@timsander1 any update on this?

@timsander1
Copy link
Contributor

This is on our long-term roadmap but unplanned in the current 6 month semester. For now, we recommend using SQL queries instead of LINQ if you need to use GROUP BY.

@dan-matthews-takeda
Copy link

This is on our long-term roadmap but unplanned in the current 6 month semester. For now, we recommend using SQL queries instead of LINQ if you need to use GROUP BY.

Unfortunately, using SQL queries just isn't possible for us - and I suspect most people using LINQ queries. We build up a query using LINQ expressions, often using generics through a repository pattern or similar. To construct SQL queries would require an entire and extremely complex re-architecture of our entire solution. Not having GroupBy LINQ support is actually killing our Cosmos DB RUs - we're having to double-hit the DB with large result sets.

I understand that everything has a priority so, given that this ticket has been open over a year already, is the delay due to low priority or complexity of implementation?

@vengi83644
Copy link

This is on our long-term roadmap but unplanned in the current 6 month semester. For now, we recommend using SQL queries instead of LINQ if you need to use GROUP BY.

Unfortunately, using SQL queries just isn't possible for us - and I suspect most people using LINQ queries. We build up a query using LINQ expressions, often using generics through a repository pattern or similar. To construct SQL queries would require an entire and extremely complex re-architecture of our entire solution. Not having GroupBy LINQ support is actually killing our Cosmos DB RUs - we're having to double-hit the DB with large result sets.

I understand that everything has a priority so, given that this ticket has been open over a year already, is the delay due to low priority or complexity of implementation?

+100000

@jstensved
Copy link

This is on our long-term roadmap but unplanned in the current 6 month semester. For now, we recommend using SQL queries instead of LINQ if you need to use GROUP BY.

Unfortunately, using SQL queries just isn't possible for us - and I suspect most people using LINQ queries. We build up a query using LINQ expressions, often using generics through a repository pattern or similar. To construct SQL queries would require an entire and extremely complex re-architecture of our entire solution. Not having GroupBy LINQ support is actually killing our Cosmos DB RUs - we're having to double-hit the DB with large result sets.

I understand that everything has a priority so, given that this ticket has been open over a year already, is the delay due to low priority or complexity of implementation?

I can't agree more. Our database is too big to even be able to fetch everything into memory and count. It must be done server-side.

@kipusoep
Copy link

Looking for this 'feature' as we speak, too bad it's not implemented yet.

@leonids2005
Copy link

this is a big problem for us as well!!! Really need this feature!!!

@randolphpark
Copy link

I am expericing same issue. Please do cosnider to prioritise this feature. Much appriciated.

@onionhammer
Copy link
Contributor

GroupBy is kind of an antipattern until cosmos can somehow utilize the index under on the server; currently it has to read through every single document to execute a group by

@leonids2005
Copy link

why it is an anti-pattern I do not understand?
If the engine cannot efficiently execute the operation it does not mean this is an anti-pattern :)

Group by is supported by SDK so it should be supported in Linq... this is a standard functionality imo.

@dan-matthews-takeda
Copy link

Here's hoping that it will include the ability to sort by more than 1 column without an index ;)

@timsander1
Copy link
Contributor

Hi all, quick update that LINQ support for GROUP BY is planned for the first half of this calendar year. We're also investing in some improvements in GROUP BY performance that will be released around the same time.

Meaning investing in improving group by perf on the cosmos server side?

That's correct. Improvements within the query engine.

@timsander1
Copy link
Contributor

For additional feedback, could you please share ideas here: https://feedback.azure.com/d365community/forum/3002b3be-0d25-ec11-b6e6-000d3a4f0858

While we review Github issues, they don't get nearly the same attention as the above site. We also post updates on the above site at a regular 6 month cadence, when we plan our roadmap.

@ivpadim
Copy link

ivpadim commented May 9, 2022

Cant wait for this feature to ship!

@shekarc
Copy link

shekarc commented May 12, 2022

Do you know of the anticipated release date for this feature?

@rmajid2
Copy link

rmajid2 commented Jul 9, 2022

Any updates on Group By Improvements (Linq support, engine optimization , index, RU Cost, Order By ...) ?

@dan-matthews
Copy link

Any news on this, Cosmos team? Been waiting for this feature a looooong time ;)

@markjbrown
Copy link

Adding @jcocchi

@dave101ua
Copy link

Hello !
Any plans regarding requested feature, please ?

@adamreed90
Copy link

FYI https://devblogs.microsoft.com/cosmosdb/introducing-a-new-system-function-and-optimized-query-operators/#group-by-and-distinct-optimizations

Indeed it is supported in the query language but not supported with LINQ, the purpose of this raised issue.

@dan-matthews
Copy link

o/~ All I want for Christmas... is support for LINQ GroupBy... o/~

@machielvisser
Copy link

And we reached Q2 2023, even though @timsander1 indicated it was planned for H1 2022. What happened since then?

@markjbrown
Copy link

Adding @jcodella

@jmolla31
Copy link

jmolla31 commented May 8, 2023

Hi do we have a roadmap for this?

@dan-matthews
Copy link

June 2023, and still all quiet on this most vital and wanted aspect of Cosmos DB! Given that this is such a hotly awaiting feature by so many people, but it is not ever being implemented - does this suggest the state of the overall Cosmos DB service? curious

@jacobmohl
Copy link

+1 on this...

@jcocchi
Copy link
Contributor

jcocchi commented Jun 22, 2023

Hi everyone, thanks for your patience as we work on this highly anticipated feature- we appreciate your feedback! Group By support in LINQ is planned for Fall 2023.

@onionhammer
Copy link
Contributor

Will add #3935 after group by support is added

@adityasa adityasa assigned leminh98 and unassigned khdang Jul 13, 2023
@fmax95
Copy link

fmax95 commented Jul 24, 2023

+1 on this...

@Mapel
Copy link

Mapel commented Sep 12, 2023

yeah, couple minutes ago I had to write a query string because CosmosDB LINQ is not supporting Group By...it's not very fun...

So +1

@jmolla31
Copy link

We make heavy use of CosmosDB on my company and the lack of GroupBy support is really hurting.

Any eta on this?

@Marusyk
Copy link

Marusyk commented Nov 25, 2023

25.11.2023 - Method 'GroupBy' is not supported

@Rasmus715
Copy link

+1. Please prioritize. It's been 4 years since this issue is opened.

@Maya-Painter
Copy link
Contributor

#4074

@leminh98
Copy link
Contributor

#4481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request LINQ QUERY
Projects
Development

No branches or pull requests