[SERVER-79552] $group rewrite for timeseries returns incorrect result if referencing the metaField in an object Created: 31/Jul/23 Updated: 29/Oct/23 Resolved: 19/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.0.19, 6.0.8, 7.0.0-rc11 |
| Fix Version/s: | 7.0.2, 5.0.22, 6.0.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gil Alon | Assignee: | Erin Zhu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | greenerbuild | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query Integration
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v7.1, v7.0, v6.0, v5.0
|
||||||||||||
| Steps To Reproduce: |
Both queries will return:
|
||||||||||||
| Sprint: | QI 2023-08-21, QI 2023-09-04, QI 2023-09-18, QI 2023-10-02 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
The $group rewrite for time-series does not take into account the difference between _id: { d: '$meta1.a.b' } and _id: '$meta1.a.b'. The rewrite returns the same result for both group queries, even though the returned documents should have different _id fields. Steps to reproduce are below. This bug will be fixed in 7.1 by |
| Comments |
| Comment by Githook User [ 19/Sep/23 ] |
|
Author: {'name': 'Erin Zhu', 'email': 'erin.zhu@mongodb.com', 'username': 'erinzhu001'}Message: (cherry picked from commit de061cfb49506f60788b1cca74d9fe661ff5f873) |
| Comment by Githook User [ 19/Sep/23 ] |
|
Author: {'name': 'Erin Zhu', 'email': 'erin.zhu@mongodb.com', 'username': 'erinzhu001'}Message: (cherry picked from commit de061cfb49506f60788b1cca74d9fe661ff5f873) |
| Comment by Githook User [ 14/Sep/23 ] |
|
Author: {'name': 'Erin Zhu', 'email': 'erin.zhu@mongodb.com', 'username': 'erinzhu001'}Message: |