[SERVER-49740] Allow _id inclusion node presence in exclusion projection AST Created: 20/Jul/20 Updated: 21/Jul/20 Resolved: 21/Jul/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Jacob Evans | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Feel free to also refactor the projection_ast API. |
| Comments |
| Comment by Ian Boros [ 20/Jul/20 ] |
|
For reference, this ticket is referring to behavior where presence of any "_id" field in an exclusion projection is treated as an exclusion. The reason this does not cause a bug in released versions is that the projection parser ensures that exclusion projection trees never have an _id field. This makes much of the analysis code simpler, because there are no special cases for _id. Unfortunately it also means that manually building a projection AST for an exclusion projection with _id: true and then converting it to an execution tree results in the wrong execution tree. |