-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 5.0.19, 6.0.8, 7.0.0-rc11
-
Component/s: None
-
Query Integration
-
Fully Compatible
-
ALL
-
v7.1, v7.0, v6.0, v5.0
-
-
QI 2023-08-21, QI 2023-09-04, QI 2023-09-18, QI 2023-10-02
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 SERVER-78234, since that ticket rewrites much of this logic, but previous versions need to be corrected. The problem is that the implementation of DocumentSourceGroup::getIdFields returns a vector of size 1 in both cases, and the rewrite logic assumes the _id field looks like _id: '$meta1.a.b'. We can use the _idFieldNames in the group processor to find differentiate between these two cases.
- is related to
-
SERVER-78234 extend min/max pushdown for $group for fixed bucketing
- Closed