[SERVER-46456] Fully bake SortPattern into the query planner Created: 27/Feb/20  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Svilen Mihaylov (Inactive) Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: neweng, qopt-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from SERVER-43630 Use SortPattern instead of raw BSON i... Closed
Assigned Teams:
Query Optimization
Participants:

 Description   

Follow up to SERVER-43630.

This ticket is about replacing the remaining usages of .getSort() with .getSortPattern() in the query planner. This might involve additional work around 1. possibly keeping track of $natural within the sort pattern and 2. extending infra around SortPattern to match prefixes and invert scan orders as necessary.



 Comments   
Comment by David Storch [ 27/Feb/20 ]

I'd love to avoid ever having SortPattern have knowledge of whether the query had a $natural sort. It would be better to rewrite any $natural sort to a $natural hint, and have any $natural-related logic consume the QueryRequest's hint field.

Generated at Thu Feb 08 05:11:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.