-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
Labels:None
-
Query Execution
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.