mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### 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: Adds support for index pushdown in join conditions for the `$merge` stage in aggregation pipelines. #### PR Summary This pull request introduces index pushdown capabilities for join conditions in the `$merge` stage, enhancing query performance. - `src/opclass/index_support.c`: Added support functions for index pushdown in `$merge` join filters. - `sql/udfs/aggregation/bson_merge_functions--1.20-0.sql`: Created new SQL functions to support index pushdown and handle merge operations. - `src/aggregation/bson_aggregation_output_pipeline.c`: Implemented functions to create join expressions and extract merge filters. - `Tests.Postgres.CSharp/Integration/Aggregation/MergeTests.cs`: Added integration tests to verify index pushdown functionality. - `src/metadata/metadata_cache.c`: Added function OIDs for new merge-related functions.