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 21, 2023
commit 4bd252e90b4be81e867d8014aa5283d90e78352d
4 changes: 3 additions & 1 deletion internal/handlers/common/aggregations/stages/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,11 @@ func (g *group) groupDocuments(ctx context.Context, in []*types.Document) ([]gro

group.addOrAppend(val, doc)
}

return group.docs, nil

case *types.Array, float64, types.Binary, types.ObjectID, bool, time.Time, types.NullType, types.Regex, int32, types.Timestamp, int64:
case *types.Array, float64, types.Binary, types.ObjectID, bool, time.Time, types.NullType,
types.Regex, int32, types.Timestamp, int64:
// non-string or document key aggregates values of all `in` documents into one aggregated document.

default:
Expand Down