-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
The transformAggregatePipeline function treats bsoncore.Array as a simple []byte and tries to marshal each value in the slice as a document, which fails. It should have a special case to recognize that bsoncore.Array actually represents a single BSON array. This gist repros the issue. Executing it fails with this error:
cannot transform type uint8 to a BSON Document: WriteInt32 can only write while positioned on a Element or Value but is positioned on a TopLevel