Skip to content

Commit

Permalink
fix cov
Browse files Browse the repository at this point in the history
  • Loading branch information
noisersup committed Jun 22, 2023
1 parent d6cd8f5 commit da16a46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions integration/aggregate_documents_compat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,12 @@ func TestAggregateCompatProject(t *testing.T) {
bson.D{{"$project", bson.D{{"_id", bson.D{{"v", "foo"}}}}}},
},
},
"IDType": {
pipeline: bson.A{
bson.D{{"$sort", bson.D{{"_id", -1}}}},
bson.D{{"$project", bson.D{{"_id", bson.D{{"$type", "$v"}}}}}},
},
},
"DocumentAndValue": {
pipeline: bson.A{
bson.D{{"$sort", bson.D{{"_id", -1}}}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func ProjectDocument(doc, projection *types.Document, inclusion bool) (*types.Do
return nil, processOperatorError(err)
}

value, err = op.Process(projected)
value, err = op.Process(doc)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit da16a46

Please sign in to comment.