[SERVER-54480] [SBE] Incorrect results for covered queries using dotted fields Created: 11/Feb/21 Updated: 29/Oct/23 Resolved: 24/Feb/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ian Boros | Assignee: | Ian Boros |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Sprint: | Query Execution 2021-02-22, Query Execution 2021-03-08 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Currently in SBE, given an index {{ {a: 1, b.c:1, b.d: 1}}}, a key like {{ {"": "foo", "": "bar", "": "baz"}}} will get inflated to {{ {a: "foo", "b.c": "bar", "b.d": "baz"}}} instead of {a: "foo", b: {c: "bar", d: "baz"}}.
The result of this is that covered queries with projections on dotted fields return incorrect results. Here is the relevant code. Either we should fix the rehydration logic, or, build plans that do not require rehydration of the key (instead of getField("a"), we can simply use the slot that the 'a' component is in). |
| Comments |
| Comment by Githook User [ 24/Feb/21 ] |
|
Author: {'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'puppyofkosh'}Message: |