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) Perf ### 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)) Aggregation performance pipeline optimization for $lookup and $unwind stage combination on same fields. ### Description 1. Optimize $lookup and $unwind stage combination on same field and lookup options are simple `localField` and `foreignField` 2. Delete dead code for $lookup ---- #### AI description (iteration 1) #### PR Classification Code cleanup and optimization. #### PR Summary This pull request improves the combination of `$lookup` and `$unwind` aggregation stages by removing redundant and complex code, simplifying the logic, and optimizing performance. - Removed the `ProcessLookupCore` function and its associated logic from `bson_aggregation_nested_pipeline.c`. - Removed the `UnwindWalkerContext` struct and related functions for optimizing `$unwind` with `ARRAY_AGG` from `bson_aggregation_nested_pipeline.c`.