Details
Description
We attempt to push predicates on the time-series metaField past the $_internalUnpackBucket stage so we can avoid unpacking buckets when possible. However, we may inadvertently push the predicate past another stage which may alter the document contents (e.g. $project) which can affect whether the document satisfies the predicate. For example:
[
|
{$project: {measurement: 1}},
|
{$match: {meta: {$lt: 100}}},
|
]
|
If we evaluate the predicate at the bucket level, we may get results, while if we evaluate after unpacking, we'll get an empty result set.