-
Type: Sub-task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
QE 2023-06-12, QE 2023-06-26, QE 2023-07-10, QE 2023-07-24, QE 2023-08-07, QE 2023-08-21, QE 2023-09-04, QE 2023-09-18, QE 2023-10-02, QE 2023-10-16, QE 2023-10-30, QE 2023-11-13, QE 2023-11-27
-
0
As part of this ticket we need to implement a new $_internalDebugQueryShape aggregation expression and integrate it into $querySettings agg stage.
This expression will take the incoming BSONObj of the command and will call the corresponding function query_shape::extractQueryShape(). Similar method call is performed in setQuerySettings and removeQuerySettings commands in order to extract QueryShape from the given BSONObj command.
For inspiration on how to implement an aggregation expression, one could look at SERVER-68686
Instead of introducing a new agg expression, we could compute the QueryShape directly in DocumentSourceQuerySettings::createFromBson() where we populate the queue with the Documents, where we add additional attribute to each of the documents.
This approach should be much simpler, involves less code changes and is more performant.
However, neither of the approaches are easy due to the cyclic dependency between QueryShape module and Aggregate command. Curious if SERVER-79736 solves this problem
- is depended on by
-
SERVER-78698 Exclude the tenantId from the $querySettings agg stage output
- Closed
- is related to
-
SERVER-82128 Add deferred queue behaviour to $queue agg stage
- Closed
-
SERVER-81486 Extract CmdWithLetShape::makeDummyExpCtx() as an ExpressionContext constructor
- Closed