-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Problem
A timeseries aggregation can return incorrect results when a measurement field contains NaN and the pipeline has a $match on that field followed by an inclusion $project. A regular collection with the same documents returns the expected matching measurement, but the time-series collection returns an empty result.
Reproduction
Insert three measurements into a time-series collection:
{ts: ISODate("2024-01-01T00:00:00Z"), m: 1, v: 1}
{ts: ISODate("2024-01-01T00:01:00Z"), m: 1, v: NaN}
{ts: ISODate("2024-01-01T00:02:00Z"), m: 1, v: 100}
Run:
[{$match: {v: {$lt: 50}}}, {$project: {_id: 0, v: 1}}]
Expected result, matching regular collection behavior:
[{v: 1}]
Actual time-series result:
[]