[SERVER-30991] Introduce MatchExpression::optimize() Created: 07/Sep/17 Updated: 30/Oct/23 Resolved: 29/Sep/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Justin Seyster |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Query 2017-10-02, Query 2017-10-23 | ||||||||
| Participants: | |||||||||
| Description |
|
This would allow arbitrary match expression nodes to optimize themselves, and for such optimizations to roll up through that node's ancestors. It could look similar to the existing Expression::optimize() virtual method. |
| Comments |
| Comment by Githook User [ 29/Sep/17 ] |
|
Author: {'email': 'justin.seyster@mongodb.com', 'name': 'Justin Seyster', 'username': 'jseyster'}Message: Reapply " This patch undoes the revert in |
| Comment by Githook User [ 29/Sep/17 ] |
|
Author: {'email': 'justin.seyster@mongodb.com', 'name': 'Justin Seyster', 'username': 'jseyster'}Message: Revert " This reverts commit 3cf4e0593c394dd7eb45d8000d76b5dc73a3f425. Reverting because of a Clang compile error. |
| Comment by Githook User [ 28/Sep/17 ] |
|
Author: {'email': 'justin.seyster@mongodb.com', 'name': 'Justin Seyster', 'username': 'jseyster'}Message: This patch refactors CanonicalQuery::normalizeTree() so that the We wanted something along the lines of an optimize() member function To get around that, we provide a getOptimizer() private function that This way, we still get to replace our if else chain with virtual |