-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently, a PlanExecutor instance is created before a DocumentSourceCursor (QO stage) instance is created. The ownership for the executor instance is then passed to the DocumentSourceCursor instance. The CursorStage (QE stage), if needed, is later created and the PlanExecutor is shared with it. Ideally, this is when we create the PlanExecutor (or at least the QE side of it) and pass it directly to the QE stage.
DocumentSourceCursor only needs some QO-relevant information from PlanExecutor (like nss() or getSecondaryNamespaces(), getCanonicalQuery()), therefore we should consider extracting it to a separate class.