[CSHARP-3529] Support $topN and similar accumulators in $group Created: 05/Apr/21  Updated: 25/Jun/22  Resolved: 25/Jun/22

Status: Closed
Project: C# Driver
Component/s: LINQ3
Affects Version/s: None
Fix Version/s: 2.17.0

Type: Improvement Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones JAVA-4094 Add builder support for pick-n accumu... Closed
Depends
depends on CSHARP-4186 Refactor AstSetWindowFieldsWindowExpr... Closed
Related
related to CSHARP-4216 Support $topN and similar accumulator... Backlog
Server Compat: 5.2
Backwards Compatibility: Fully Compatible

 Description   
Downstream Change Summary

Please see the scope doc and let Query know if any questions

Description of Linked Ticket

Epic Summary

Summary

Add a $top accumulator that returns an array of expressions evaluated for top n documents according to a given sort order

Motivation

One common analytical task is to find the top or bottom n elements in each cohort. For example, we are interested in the 10 best salespeople for each region based on their individual sales, or in the 5 slowest queries issued by a given tenant on each day. This is a generalization of finding the best or worst element.

Cast of Characters

  • Product Owner: Katya Kamenieva
  • Project Lead: TBD
  • Program Manager: Craig Homa
  • Drivers Contact: TBD

Documentation

Scope Document
Technical Design Document
Product Description



 Comments   
Comment by Githook User [ 25/Jun/22 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-3529: Skip tests on older servers.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/216e3b7c772ba4d2b1df2803ad6caf3de3b196bc

Comment by Githook User [ 24/Jun/22 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-3529: Support $topN and similar accumulators in $group.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/0e47c1635a8b03f32b0c9cb380140fdf4366f72b

Generated at Wed Feb 07 21:45:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.