-
Type:
Investigation
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Developer Tools
This change updates Express executor output so keyPattern is emitted as a BSON/JSON object instead of a preformatted string, making it easier to parse and more consistent with regular IXSCAN output.
It also updates related explain/profile behavior and tests to reflect the new object-based keyPattern representation.
Description of Linked Ticket
The Compass team is working on COMPASS-7794 and ran into some challenges processing the explain output of express plans. In particular, the keyPattern field has a different format for express plans that is proving difficult to parse. For express plans, we see the following output:
{
"stage" : "EXPRESS_IXSCAN",
"keyPattern" : "{ _id: 1 }",
...
},
and
{
"stage" : "EXPRESS_IXSCAN",
"keyPattern" : "{ a: 1 }",
...
},
whereas regular index scans result in the following:
"stage" : "IXSCAN", "keyPattern" : { "a" : 1 },
The ask is to make the keyPattern field more easily parseable, either by wrapping the field names in quotes:
"keyPattern": "{ \"a\": 1 }",
or by serializing the pattern as an object as we do in non-express explain output.
- depends on
-
SERVER-92981 Make the keyPattern field in express plan explains more easily parseable
-
- Closed
-