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) POC Feature ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) Not yet ### Are you introducing any new config? If yes, do you have tests with and without them being set? Yes ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Add plumbing in planner for orderby pushdown to the index. This is guarded behind a GUC and doesn't work yet - but at least introduce this for later. ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for orderby pushdown in the planner. - `index_support.c`: Introduced `ConsiderIndexOrderByPushdown` function to handle orderby pushdown logic. - `rum.c`: Added support for orderby pushdown in RUM index scan and validation. - `metadata_cache.c`: Added `BsonOrderByIndexOperatorId` function. - `testing_configs.c`: Defined new configuration variable `EnableIndexOrderbyPushdown`. - New test files `bson_composite_order_by_index_tests.sql` and `bson_composite_order_by_index_tests.out` to validate the feature. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->