Merged PR 1446886: $first(N) & $last(N) implementation for $setWindowFields stage

### Does this PR have any customer impact?
Yes
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

----
#### AI description  (iteration 1)
#### PR Classification
New feature implementation for the `$setWindowFields` stage.

#### PR Summary
This pull request implements the `$first(N)` and `$last(N)` aggregation functions for the `$setWindowFields` stage.
- Added new aggregate functions in `oss/pg_helio_api/sql/udfs/aggregation/group_aggregates--1.21-0.sql` for `BSONFIRST`, `BSONLAST`, `BSONFIRSTN`, `BSONLASTN`, and their sorted variants.

Related work items: #2151585, #2151587
This commit is contained in:
Ujjwal Agrawal authored and Murat Tuncer committed 2024-09-19 20:36:13 +03:00
1 parent 06bb0a2e36
commit dc157bd631
16 files changed
+1034 -371

No files matched your search

+1
View File
@@ -474,6 +474,7 @@ Location5788003,5788003,464
Location5788004,5788004,465
Location5788005,5788005,466
Location5788200,5788200,451
Location5788604,5788604,489
Location5858203,5858203,452
Location5876900,5876900,474
Location5897900,5897900,475
1 ErrorName MongoError OrdinalPosition
474 Location5788004 5788004 465
475 Location5788005 5788005 466
476 Location5788200 5788200 451
477 Location5788604 5788604 489
478 Location5858203 5858203 452
479 Location5876900 5876900 474
480 Location5897900 5897900 475