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 Migrate conditional operators (`$ifNull`, `$cond`, `$switch`) to new aggregation framework and ensure correct behavior. ---- #### AI description (iteration 1) #### PR Classification Performance improvement for conditional aggregation operations. #### PR Summary This pull request refactors and optimizes the handling of arithmetic and boolean aggregation operators to improve performance. - `bson_expression_arithmetic_operators.c`: Refactored functions to handle pre-parsed arithmetic operations, added helper functions for single, dual, and variable operand parsing and evaluation. - `bson_expression_boolean_operators.c`: Refactored functions to handle pre-parsed boolean operations, added helper functions for variable operand parsing and evaluation, and a unified boolean operator processing function. Related work items: #3430332