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
Use case for groupBy:
Consider you want to count documents for each distinct value of a field in a fetch. Now you may only do it using a Map in a DocumentProcessor to collect all of the documents and process them all. On the other hand, groupBy may process it as distinct fetches for each value of a field using a function as (value, subFetch) -> T.
Next, consider you want to find the maximum value for field field1 on the specific fetch from the database. Now you have the only option - run over all of the documents of fetch and find the maximum. But if we evolve querying API, we may provide a way to find the maximum value of a field in a fetch with only O(log N).
Let's think about adding groupBy functionality for query
The text was updated successfully, but these errors were encountered: