[SERVER-55595] Matching results with empty path component don't make sense Created: 29/Mar/21 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Query Language |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Mathias Stearn | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Optimization
|
| Operating System: | ALL |
| Participants: | |
| Case: | (copied to CRM) |
| Description |
If we aren't going to error when there is an empty path component, the results should at least make sense. I can't think of any reason (modulo bugs of course) why the first document would match {'x.': 1}. And the second document should either match both or neither of {'x.': 1} and {'y.': 1}. The current behavior where it matches one but not the other is odd. |
| Comments |
| Comment by Mathias Stearn [ 29/Mar/21 ] | ||||||||||||||||
|
Note that we already error if you use an empty path in the projection, so errorring out when they are in the match predicate also seems reasonable.
|