-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
There have been two cases recently where it appears the unit test would be exercising logic that wouldn't be hit in production due to MatchExpression::optimize() taking a pass before the logic being tested is actually used.
We should consider ways to programmatically enforce these control flow expectations/invariants (e.g. you can't create a MatchExpression and not optimize it), or at least take a look at whether we could move the unit test and standard query path more in line for some of our bigger tests like `query_planner_unit_test`.