We currently have an optimisation to rewrite a $group with the group key on meta field, and the accumulator(s) using either $min or $max on measurements. This logic is incorrectly assuming that all non-timeField paths can be treated as measurements. We rewrite a path "$x" as either "$control.min.x" or "$control.max.x". This rewrite would be incorrect when the accumulator is using a metaField. In this case, the rewrite logic should be a path "$metaField.x" gets written into "$meta.x".
- causes
-
SERVER-75243 Disable broken timeseries_lastpoint_top.js test
- Closed
- related to
-
SERVER-73822 Time-series $group rewrite ignores certain accumulators
- Closed