Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support _id aggregation operators for $group stage #3096

Merged
merged 19 commits into from
Jul 26, 2023
Prev Previous commit
Next Next commit
lint
  • Loading branch information
noisersup committed Jul 25, 2023
commit 88114de5760c972997f933c93c9d680570d9eed0
7 changes: 5 additions & 2 deletions internal/handlers/common/aggregations/stages/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,18 @@ func newGroup(stage *types.Document) (aggregations.Stage, error) {
}

groupKey = v

continue
}

op, err := operators.NewOperator(doc)
var op operators.Operator
op, err = operators.NewOperator(doc)

if err != nil {
return nil, processOperatorError(err)
}

if _, err := op.Process(nil); err != nil {
if _, err = op.Process(nil); err != nil {
return nil, processOperatorError(err)
}
}
Expand Down