-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
v6.0
-
Execution Team 2022-05-02
Storing the following values in BSONColumn opens object compression with a single interleaved stream for "x":
{"x": 1} {"x": 2} {"x": {"y": 2, "z": 3}} {"x": {"y": 3, "z": 4}}
The {"y": 2, "z": 3} in the third and forth object are stored as uncompressed scalars in that single interleaved stream.
However, if the ordering of appends were reversed:
{"x": {"y": 3, "z": 4}} {"x": {"y": 2, "z": 3}} {"x": 2} {"x": 1}
We would start with object compression with two streams and end it when the third object is encountered and restart object compression with a single stream for "x" as a scalar.
The behavior should be the same regardless of order. When going from scalar to object we should also re-start object compression.