[SERVER-81851] Constant-fold makeBsonObj Created: 04/Oct/23  Updated: 18/Jan/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Alya Berciu Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: M9
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-79367 Optimize projections in Bonsai Closed
Assigned Teams:
Query Optimization
Participants:

 Description   

Once SERVER-79367 is merged, we should add a const-folding step that detects when we have the following ABT:

FunctionCall("makeBsonObj", Constant [MakeObjSpec], Constant [anything], <any args that don't depend on any external variables>)

And const-folds it into a Constant [<object>] according to the given MakeObjSpec (second argument). Note that the same logic can be used for makeObj as well. One idea would be to just execute this SBE expression once and set the output to the constant value.


Generated at Thu Feb 08 06:47:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.