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

Allow rewrite to push inclusion meta projections past $unpackBucket

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None
    • Query Optimization 2021-04-19, Query Optimization 2021-05-03

    Description

      If we have an inclusion $project only on meta after an $unpackBucket, we can move the $project before $unpackBucket. For example, roughly:

      {$unpackBucket: {exclude: [], metaField: "myMeta"}},
      {$project : {myMeta.a : 1, myMeta.b: 1, _id: 0}}
      --->
      {$project : {meta.a : 1, meta.b: 1}}
      {$unpackBucket: {exclude: [], metaField: "myMeta"}},
       

      Attachments

        Issue Links

          Activity

            People

              hana.pearlman@mongodb.com Hana Pearlman
              hana.pearlman@mongodb.com Hana Pearlman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: