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

Allow rewrite to push inclusion meta projections past $unpackBucket

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sprint:
      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

              Assignee:
              hana.pearlman Hana Pearlman
              Reporter:
              hana.pearlman Hana Pearlman
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: