Files
documentdb/pg_documentdb
Parag Jain d3a92030fa Merged PR 1528481: [Perf] Optimize $merge "merge" option
### 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
[Perf] Optimize $merge "merge" option

----
#### AI description  (iteration 1)
#### PR Classification
Performance optimization:

Single document in collection and  each entry is average of 10 runs.
![image.png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1528481/attachments/image.png)

#### PR Summary
This pull request optimizes the `$merge` "merge" option by improving the handling of BSON elements.
- `bson_aggregation_output_pipeline.c`: Replaces the tree-based approach with a hash table to manage BSON elements, ensuring order and improving performance.
- Adds new functions and data structures for creating and managing an ordered hash set of BSON elements.
2025-01-15 07:48:39 +00:00
..