Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-83504

Exclusion projection disables lastpoint optimization in timeseries

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration

      Pipeline

      [{$group: {_id: "$m", l: {$bottom: {sortBy: {t: 1}, output: "$x"}}}}]
      

      over timeseries with "m" being the metaField and "t" being the timeField triggers lastpoint optimization as expected, however, the same pipeline prefixed with exclusion projection:

      [{$project: {y: 0}}, {$group: {_id: "$m", l: {$bottom: {sortBy: {t: 1}, output: "$x"}}}}]
      

      does not. But it would be valid to apply the optimization in this case as well (or remove the useless projection altogether).

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: