|
Author:
{'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}
Message: SERVER-80483 Only compute lastRefs where needed for lowering
Most phases in the optimizer use VariableEnvironment only to connect
definitions and uses. The last-ref analysis is only needed when lowering
to SBE.
This commit:
- changes the implementation of VariableEnvironment to compute
lastRefs in a separate pass.
- lets the caller choose to skip this separate pass.
It also makes the intermediate data structure in last-refs more
efficient, by not representing non-last-ref variables. Previously we
were iterating over these uninteresting variables at every level of the
recursion.
Branch: master
https://github.com/mongodb/mongo/commit/96464e8d57559625b52138ee6f3967300db6425f
|