mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description ---- #### AI description (iteration 1) #### PR Classification New feature: Adds support for `$maxN` and `$minN` operators in the `setWindowFields` stage. #### PR Summary This pull request introduces the `$maxN` and `$minN` window aggregation operators, including their syntax validation and handling. - `oss/pg_helio_api/src/aggregation/bson_aggregation_window_operators.c`: Added functions to handle `$maxN` and `$minN` operators, including syntax validation. - `pgmongo/src/test/regress/sql/bson_aggregation_pipeline_stage_setWindowFields.sql`: Added tests for `$maxN` and `$minN` operators with various window configurations. - `pgmongo/src/test/regress/expected/setwindowfields_and_group_compliance.out`: Updated compliance tests to reflect support for `$maxN` and `$minN` in `setWindowFields`.