[SERVER-69895] [CQF] Support reverse collscan: hint: {$natural: -1} Created: 22/Sep/22 Updated: 29/Oct/23 Resolved: 23/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Hana Pearlman | Assignee: | Hana Pearlman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | cascades-starter, hint | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | QO 2023-02-06 | ||||||||
| Participants: | |||||||||
| Description |
|
We currently permit {$natural: 1} hints, but uassert on {$natural: -1} hints. Instead of uasserting, we should support both hints. |
| Comments |
| Comment by Githook User [ 23/Jan/23 ] |
|
Author: {'name': 'Hana Pearlman', 'email': 'hana.pearlman@mongodb.com', 'username': 'HanaPearlman'}Message: |
| Comment by David Percy [ 20/Dec/22 ] |
|
It looks like currently Bonsai interprets {$natural: 1} to mean "don't use indexes". To support {$natural: -1} we need to add something like "sort by record ID descending". I wonder if we should also be more explicit that {$natural: 1} means "sort by record ID ascending". |