-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
According to the IDL definition, an agg command can be specified with explain: true. This explain parameter is kept on the AggCommandRequest as a verbosity, not a boolean. The conversion from bool to verbosity happens here.
This is a bit weird. We should consider leaving the explain as a boolean on the AggCommandRequest. As with other commands being explained, this verbosity eventually makes its way down to the expression context. This change would be a step towards simplifying the explain implementation by reducing the number of places we track verbosity and directing callers to look at the expression context instead.
To make this work, we need another way to pass verbosity down to the expression context. We could do this by adding a new explain verbosity parameter to runAggregate, which would be populated according to the explain on the AggCommandRequest here, and the explain from the ExplainCommandRequest elsewhere (e.g., here).
- is related to
-
SERVER-81885 Remove explain attribute from aggregate command idl
-
- Backlog
-