mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 19:59:54 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Bugfix ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### 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 1) In point read wtih `$near`/`$nearSphere` disable the optimization since it creates subqueries 2) Remove projections that are "resJunk" since we're not sorting with the point read. 3) Refactor getting the filters into a separate method. ---- #### AI description (iteration 2) #### PR Classification Bug fix #### PR Summary This pull request addresses bugs in the custom planner related to point read plans and improves the handling of projections and query qualifications. - `documents_custom_planner.c`: Added functions `SetPointReadQualsOnIndexScan` and `FormatProjections` to handle point read qualifications and projections more effectively. - `bson_aggregation_pipeline_tests_point_read.out`: Updated expected output to reflect changes in query plans and error handling. - `bson_aggregation_pipeline.c`: Added a check to invalidate point read plans when pushing to a subquery. - `bson_aggregation_pipeline_tests_point_read.sql`: Added new test cases for special operators in filters.