[SERVER-83423] [CQF] Store parameterized constants in optimizer metadata Created: 17/Nov/23  Updated: 05/Dec/23  Resolved: 05/Dec/23

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

Type: Task Priority: Major - P3
Reporter: Ben Shteinfeld Assignee: Ben Shteinfeld
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-83424 [CQF] Enable sampling CE with query p... Closed
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-11-27, QO 2023-12-11
Participants:

 Description   

We need to store the constants associated with query parameters so that they can be given to the CE module. Storing them once in the metadata prevents us from needing to copy potentially large constants multiple times.



 Comments   
Comment by Githook User [ 05/Dec/23 ]

Author:

{'name': 'Ben Shteinfeld', 'email': 'ben.shteinfeld@mongodb.com', 'username': 'bshteinfeld'}

Message: SERVER-83423 Plumb query parameters through from OptPhaseManager to deriveCE()

This patch add query parameters to the API of deriveCE(), so that the CE
modules can make use of constants when calculating selectivities of
predicates. This is crucial to having CE work with paramterization.

GitOrigin-RevId: 0f74198dcfd30217f9ba69b65fe02fd0ddb367dd
Branch: master
https://github.com/mongodb/mongo/commit/fd41d076c7ecf91c584be8fd58177b5316c49d8b

Comment by Githook User [ 05/Dec/23 ]

Author:

{'name': 'Ben Shteinfeld', 'email': 'ben.shteinfeld@mongodb.com', 'username': 'bshteinfeld'}

Message: SERVER-83423 Store query parameters in OptPhaseManager

This patch introduces the concept of QueryParameterMap which maps from
parameter ID to Constant. This map is populated during ABT translation
and then given to the OptPhaseManager.

GitOrigin-RevId: d82dc3b598f84a78b1f0d89c7d9c2b65c1d6a625
Branch: master
https://github.com/mongodb/mongo/commit/bc7898a58fde5278390dbe9d0e3205a97cd3de74

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