[SERVER-71530] [CQF] Avoid building a vector in walkVariables() Created: 21/Nov/22  Updated: 29/Oct/23  Resolved: 21/Dec/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Improvement Priority: Major - P3
Reporter: David Percy Assignee: Will Buerger
Resolution: Fixed Votes: 0
Labels: cascades-starter
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Sprint: QO 2022-12-26
Participants:

 Description   

VariableCollector takes an ABT and builds a vector of all the Variable references (and definitions). Sometimes the consumer doesn't want a vector: they may want a set, or a per-variable count.

VariableEnvironment::walkVariables() calls a callback for each Variable, which lets the consumer decide what collection to build (if any). But currently it uses VariableCollector, which builds a vector. Instead we should have a different transport that takes a callback.



 Comments   
Comment by Githook User [ 21/Dec/22 ]

Author:

{'name': 'Will Buerger', 'email': 'will.buerger@mongodb.com', 'username': 'wbuerger46'}

Message: SERVER-71530: Add VariableTransporter for walking variables with callback
Branch: master
https://github.com/mongodb/mongo/commit/a113e6c5bf58673f792ef53768a2072a9fac0ba9

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