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

Exclusion projection disables lastpoint optimization in timeseries

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Integration

    Description

      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).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: