[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:
Depends
is depended on by SERVER-54541 [SBE] Fields mismatch in result docum... Closed
Duplicate
duplicates SERVER-54555 [SBE] Not all documents are matched o... Closed
is duplicated by SERVER-54313 [SBE] Incorrect number of fields in f... Closed
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: SERVER-54480 Fix index key rehydration in SBE
Branch: master
https://github.com/mongodb/mongo/commit/7634943d1a2298a916fbf7aa140da79ea50e47b0

Generated at Thu Feb 08 05:33:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.