-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
Aggregate() functions currently accept bson.D as a valid value for the pipeline parameter but should not allow this because a bson.D is semantically a single document while a pipeline is an array of documents. This likely works internally because bson.D is implemented as a slice of bson.E, so it passes our "value is a slice" check in transformAggregatePipeline. We may have to special case bson.D and possibly other slice-based types like bson.Raw to prevent this. A reproducible example of this issue is here.