-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
By design, the sbe::EConstant expression owns the constant value it holds. It means that whenever we need to create two instances sbe::EConstant holding the same constant value, we will have to make two copies of this value. It could quickly become impractical when these constants are large objects (long strings, large arrays or documents).
Instead of creating multiple copies we should create just one and use it in the plan. This can be achieved by placing all constants into the RuntimeEnvironment and use it as a constant pool.