-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently, DocumentSourceExtensionOptimizable::distributedPlanLogic operates under the assumption that if an extension is returning a host-allocated parse node, the BSON spec corresponds to an actual host stage. However, there are no guardrails preventing an extension developer from returning a host-allocated parse node with the BSON of an extension stage.
If this were to happen, DocumentSource:: parse() would look at the BSON, see that it's an extension, and create a LiteParsedExpandable object which would later convert to DocumentSourceExtensionForQueryShape. Notably, there would be no expansion that converts LiteParsedExpandable to LiteParsedExpanded. When transitioning from optimization to execution, DocumentSourceExtensionForQueryShape has no corresponding execution form as designed, causing a generic stage mapping error message.
This PR should add a more helpful error message when it's detected that the host-allocated parse node holds extension BSON.
- related to
-
SERVER-118872 Enable $listMqlEntities tests in 'with-extensions' variant
-
- Backlog
-