[SERVER-58431] Modify HashAgg stage in preparation for $lookup + $group pushdown Created: 12/Jul/21  Updated: 29/Oct/23  Resolved: 26/Jul/21

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

Type: Task Priority: Major - P3
Reporter: Ian Boros Assignee: Martin Neupauer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Query Execution 2021-07-26
Participants:
Linked BF Score: 162

 Description   

Two important changes must be made to HashAgg:
1) It should have a flag for whether or not to recompute the hash table on calls to re-open. In the case where the HashAgg is on the right side of an NLJ and there are no correlated variables below it (or used in the HashAgg itself), we can safely skip any re-computation. This will be an important optimization to have for the way $lookup will be translated.
2) It should have an option to "look up" a particular group key chosen at runtime. That is, on re-opens, when the hash table is already built (and does not need to be re-built) the stage should simply position itself at this key and then return EOF.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 26/Jul/21 ]

Author:

{'name': 'Martin Neupauer', 'email': 'martin.neupauer@mongodb.com', 'username': 'MartinNeupauer'}

Message: SERVER-58431 Modify HashAgg stage in preparation for $lookup + $group pushdown

Fix the reopen case when we do not provide seek keys.
Branch: master
https://github.com/mongodb/mongo/commit/4224de7c24a33d5ac58d3ce6072e3a8f42f691bc

Comment by Martin Neupauer [ 26/Jul/21 ]

https://github.com/10gen/mongo/pull/135

Comment by Githook User [ 22/Jul/21 ]

Author:

{'name': 'Martin Neupauer', 'email': 'martin.neupauer@mongodb.com', 'username': 'MartinNeupauer'}

Message: SERVER-58431 Modify HashAgg stage in preparation for $lookup + $group pushdown

Implemented optinal seek keys used to lookup a particular key in the hash table.
Branch: master
https://github.com/mongodb/mongo/commit/f5afeb9966a9a58f26347c3670bd42f36560eb8a

Generated at Thu Feb 08 05:44:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.