[SERVER-54129] Simplify generated SBE expressions when some arguments are constants Created: 29/Jan/21 Updated: 06/Dec/22 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Anton Korshunov | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | sbe-post-v1, sbe-rollout | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Sprint: | Query Execution 2021-05-03, Query Execution 2021-05-17, Query Execution 2021-05-31, Query Execution 2021-06-14, Query Execution 2021-06-28, Query Execution 2021-07-12, Query Execution 2021-07-26 |
| Participants: |
| Description |
|
When we translate MQL expressions in SBE, some arguments for these expressions can be constants. In this case we can statically perform all necessary checks on the constant arguments during the stage building phase, rather than doing it in runtime. This should greatly simplify generated SBE expressions. For example, here is an expressions generated for $split: ["$a", " "]:
Note all the checks around slot l1.1 - they're totally redundant. We need to analyze all expressions in the SBE expression stage builder and optimize them to perform compile time checks for constant arguments.
|
| Comments |
| Comment by Kyle Suarez [ 05/Aug/21 ] |
|
Per a discussion with Mihai, bumping this out to the future to wait, in case there are things here that interfere with the plan cache / query parametrization. |
| Comment by Githook User [ 02/Aug/21 ] |
|
Author: {'name': 'Mihai Andrei', 'email': 'mihai.andrei@10gen.com', 'username': 'mtandrei'}Message: Revert "SERVER-54129 Simplify generated SBE expressions for $mod, $add, and $split when some arguments are constants" This reverts commit 149c1670828efa6937220ab0e5bc4fa40ed55a1d. |
| Comment by Githook User [ 30/Jul/21 ] |
|
Author: {'name': 'Mihai Andrei', 'email': 'mihai.andrei@10gen.com', 'username': 'mtandrei'}Message: SERVER-54129 Simplify generated SBE expressions for $mod, $add, and $split when some arguments are constants |