-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Some ideas that came out of SERVER-99121 to improve DocumentSourceMatch and DocumentSourceLookup:
- Currently, DocumentSourceLookup::_matchSrc is a pointer to any DocumentSourceMatch(s) that the $lookup was able to absorb during the LUM ($lookup, $unwind, $match) rewrite. It would make more sense for _matchSrc to directly be a pointer to the MatchExpression instead, since we only use _matchSrc to generate the additional filter for the lookup. Note that to do this we would need to add a function that releases the MatchExpression/backing BSON from the DocumentSourceMatch in the pipeline, as described here.
- Since _matchSrc is now a MatchExpression, and the main contents of DocumentSourceMatch::joinMatchWith operate over MatchExpressions (as of
SERVER-99121), we could pull out the work currently done in the addPredicates lambda and either put it in expression_algo.h or make it a function of the MatchExpression class. - Similarly, DocumentSourceMatch::descendMatchOnPath is only used in this LUM rewrite and operates over the input MatchExpression. It would make more sense to either put it in expression_algo.h or make it a function of the MatchExpression class.
- related to
-
SERVER-99121 DocumentSourceMatch::joinMatchWith erroneously depends on the _predicate member
-
- Closed
-