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 In absence of citus we figured out that there were few issue in AST, we were building for merge. Below values were incorrect In AST which due to that when target is empty there was no row in join we need to do left outer join for insertions and for target collection targetList should be NIL. 1. `query->mergeUseOuterJoin = true;` 2. `query->targetList = NIL;` fixed in this PR. issue link : https://github.com/microsoft/documentdb/issues/20 ---- #### AI description (iteration 1) #### PR Classification Bug fix #### PR Summary This pull request addresses an issue where the merge stage was not functioning correctly. - `oss/pg_documentdb/src/aggregation/bson_aggregation_output_pipeline.c`: Fixed the merge stage by setting `mergeUseOuterJoin` to true and initializing `targetList` to NIL.