Found by the new fuzzer SERVER-92675. The BSONColumnBuilder checks whether new objects have any scalars in them. If the previous element was non-interleaved, it will correctly use this to decide whether to start interleaved or add it as a literal in regular mode. If the previous element was also an object, it will likewise correctly use this to decide whether to start a regular mode or not.
However, if the previous object was an array, it will always go into interleaved mode, even if there are no scalars to reference from.
- related to
-
SERVER-93917 [v7.0] Evaluate whether array -> object interleaved bug applies to 7.0 and prior
-
- Closed
-