Aggregation with $function causes embedded shell to infinite load

XMLWordPrintableJSON

    • 3
    • Not Needed
    • None
    • Developer Tools

      This pipeline in the embedded shell in Compass causes and infinite loader. It works as expected in mongosh.

      db.test.aggregate([
        {
          $addFields: {
              newField: {
                $function: {
                  body: function (name) {
                    return 1;
                  },
                  args: ["$name"],
                  lang: "js"
                }
              }
            }
        }
      ]) 

              Assignee:
              Unassigned
              Reporter:
              Rhys Howell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: