[SERVER-80323] Support no measurement fields in $_internalUnpackBucket Created: 22/Aug/23  Updated: 03/Nov/23  Resolved: 03/Nov/23

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

Type: Task Priority: Major - P3
Reporter: Yoon Soo Kim Assignee: Irina Yatsenko (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Sprint: QI 2023-10-02, QI 2023-10-16, QI 2023-10-30, QI 2023-11-13
Participants:

 Description   

As of today, we can't lower the following pipeline

db.ts2.explain().aggregate([{$group: {_id: "$tag", x: {$sum: "$tag"}}}, {$match: {_id: 1}}]);

because $_internalUnpackBucket will not have any measurement fields to unpack and if the block_to_row / ts_bucket_to_cell_block stages in the SBE do not have any fields to unpack, then they can't know how many rows to produce according to the current implementation. We can probably map the meta field to a ScalarMonoCellBlock instead of mapping it to a scalar SBE value. In such case, we may need positional information for ScalarMonoCellBlock.



 Comments   
Comment by Githook User [ 02/Nov/23 ]

Author:

{'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}

Message: SERVER-80323 Support lowering to SBE of count-like queries over time-series
Branch: master
https://github.com/mongodb/mongo/commit/101a65a4553258f3b28a62284fc2b95593ae714e

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