-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
Currently, the `splitMatchExpressionBy` function will mark part of a match stage as ineligible for pushdown if the filter path and the paths required by the previous stage contain dependencies. For instance, in the following pipeline:
[{$replaceWith: '$subDocument'},
{$match: {'subDocument.x': 2}}
the $match stage will not be pushed down because 'subDocument' and 'subDocument.x' are marked as dependent, even though the fields are independent in the document and simply have the same name:
{subDocument: {subDocument: x}}
We should improve the analysis of the `containsDependency` helper to recognize when a field is independent of and simply has the same/overlapping name as a field in an earlier stage.
- is related to
-
SERVER-88220 Enable match pushdown for replaceRoot
- Closed