You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeof(Microsoft.Azure.Cosmos.QueryPlanHandler+QueryPlanHandlerException): Query contains 1 or more unsupported features. Upgrade your SDK to a version that does support the requested features:
Query contained CompositeAggregate, which the calling client does not support. (Query contained CompositeAggregate, which the calling client does not support.)
---- Microsoft.Azure.Cosmos.QueryPlanHandler+QueryPlanHandlerException : Query contains 1 or more unsupported features. Upgrade your SDK to a version that does support the requested features:
Query contained CompositeAggregate, which the calling client does not support. (Query contained CompositeAggregate, which the calling client does not support.)
-------- System.ArgumentException : Query contained CompositeAggregate, which the calling client does not support.
Reacted by Jon P Smith, paulost, Robert Gazsi, YohanS, Aford73, thestacks, Matthew Lieder, Michael Cavanaugh and Felipe de Luca Andrea
I'm trying to use Cosmos DB and I need a count of all the entries to make paging work. Can you suggest a way around this problem that doesn't require me to ingest all the data?
Activity
[-]Cosmos: Aggregate operators[/-][+]Cosmos: Support aggregate operators[/+]smitpatel commentedon Sep 20, 2019
https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-linq-to-sql
JonPSmith commentedon Oct 17, 2019
I'm trying to use Cosmos DB and I need a count of all the entries to make paging work. Can you suggest a way around this problem that doesn't require me to ingest all the data?
AndriySvyryd commentedon Oct 17, 2019
@JonPSmith The best you can do for now is something like
query.Select(_ => 1).AsEnumerable().Count()23 remaining items
roji commentedon Jun 15, 2024
This is now supported, as of #33895 - though we're likely missing qiute a bit of test coverage.
For example:
... now gets translated to:
Aggregate operators work also on the top-level entity types. GroupBy isn't yet supported, that's tracked by #17313.