[SERVER-42336] Direct KeyString to Document/Value conversion Created: 22/Jul/19  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Query Execution
Participants:

 Description   

In SERVER-42181, we plan to make WorkingSetMember represent the data at query runtime as Document/Value instead of BSONObj. This is part of an effort to unify DocumentSource and PlanStage to use the same data representation. Currently, DocumentSource uses Document/Value and PlanStage uses BSON.

As part of this work, we will likely change WorkingSetMember to use a Document/Value representation for index keys. The storage format for index keys is KeyString. Therefore, a simplistic implementation of this change would require the KeyString to be converted into a BSONObj, and then the BSONObj to subsequently be converted into a Document (or maybe a vector<Value>, depending on what index key representation we choose). We could optimize this two-step conversion by implementing a way to convert a KeyString directly into Document/Value, and using this new conversion in the implementation of index access stages such as IXSCAN and DISTINCT_SCAN.



 Comments   
Comment by David Storch [ 26/Sep/19 ]

I'm flagging this for re-triage, since I don't think we currently plan to implement it as part of the "single sort implementation for query execution" project.

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