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).
- duplicates
-
SERVER-54555 [SBE] Not all documents are matched or wrong result in jstests/core/hashed_index_collation.js
- Closed
- is depended on by
-
SERVER-54541 [SBE] Fields mismatch in result document in jstests/core/projection_dotted_paths.js
- Closed
- is duplicated by
-
SERVER-54313 [SBE] Incorrect number of fields in final document in jstests/aggregation/sources/project/remove_redundant_projects.js
- Closed