azure-cosmos-db-emulator-docker
azure-cosmos-db-emulator-docker copied to clipboard
Query with VALUE COUNT(1) does not work
Following query does not work.
SELECT VALUE COUNT(1) FROM c
Cosmos SDK uses queries with VALUE COUNT(1) when using CountAsync method with an IQueryable.
Do you happen to have the exception you received when you tried this and it didn't work?
I get the following error when using Cosmos explorer in browser:
Exception while reading from stream Cosmos query text: SELECT VALUE COUNT(1) FROM c -> SELECT COUNT(1) FROM %s AS c
We don't support that flavor of aggregation yet. Stay tuned...
Unfortunately this is the flavour of aggregation you get from LINQ to NoSql translation, so my code still won't work with the current build. :(
What is the situation with this issue? This is a really bad blocker as Cosmos SDK uses this kind of COUNT query.
Hi! I am also having this issue with the cosmos vnext emulator. Is there any expected date for this feature?
We will investigate if there is an easy fix not involving the query engine (see https://github.com/Azure/azure-cosmos-db-emulator-docker/discussions/200) We will keep you posted.
@RichMercer @jvalkeejarvi @Pacopb-itx We added support to this query style in our last release https://github.com/Azure/azure-cosmos-db-emulator-docker/releases/tag/EN20250612 . Please let us know if you have further issues (reopen this issue or open another one).
We published a fix and will close this issue. Please reopen if you have still problems