[SERVER-53977] Allow rewrite to produce only empty documents in $unpackBucket if it is followed by $count Created: 22/Jan/21  Updated: 29/Oct/23  Resolved: 19/Mar/21

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Jacob Evans Assignee: Svilen Mihaylov (Inactive)
Resolution: Fixed Votes: 0
Labels: qopt-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-53486 Allow rewrite to push projections on ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2021-01-25, Query Optimization 2021-02-22, Query Optimization 2021-03-08, Query Optimization 2021-03-22
Participants:

 Description   

We can achieve this by changing the arguments to:

{include: []}

This should be done inside $unpackBucket's doOptimizeAt() and coordinated with the rest of the code being called from there.



 Comments   
Comment by Githook User [ 19/Mar/21 ]

Author:

{'name': 'Svilen Mihaylov', 'email': 'svilen.mihaylov@mongodb.com', 'username': 'smihaylov-mongodb'}

Message: SERVER-53977 Allow rewrite to produce only empty documents in $unpackBucket if it is followed by $count
Branch: master
https://github.com/mongodb/mongo/commit/100aa85b38298dec106bbab864b2ff06f4d1672d

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