[SERVER-54128] Computed projection should not be pushed down past sort+limit Created: 29/Jan/21 Updated: 29/Oct/23 Resolved: 23/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc4, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | David Percy |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | post-rc0 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v5.0
|
||||||||||||||||
| Sprint: | Query Optimization 2021-06-14, Query Optimization 2021-06-28 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 136 | ||||||||||||||||
| Description |
|
In PipelineD::prepareExecutor, we are sometimes pushing down a computed projection past a sort+limit. This is incorrect because the projection can raise an error when it sees documents that the sort+limit would not return. We should change buildProjectionForPushdown so that it never returns a computed projection:
Computed projections should be ineligible for case 1. For example, if the pipeline starts with {$project: {b: {$round: "$a"}}}, we'll fall through to case 2 and push down {a: 1}, based on the dependencies. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 24/Jun/21 ] |
|
Author: {'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}Message: |
| Comment by Githook User [ 23/Jun/21 ] |
|
Author: {'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}Message: |