|
If a BSON column encoding has a zero delta after interleave end, that means the previous object should be repeated. However, currently there is no unit test for this case. We should add a test like the following
TEST_F(BSONColumnTest, ZeroDeltaAfterInterleaved) {
|
auto obj = createElementObj(BSON("a" << 1));
|
std::vector<BSONElement> elems = {obj, obj};
|
|
BufBuilder expected;
|
appendInterleavedStart(expected, obj.Obj());
|
appendSimple8bControl(expected, 0b1000, 0b0000);
|
appendSimple8bBlocks64(expected, {kDeltaForBinaryEqualValues}, 1);
|
appendEOO(expected);
|
appendSimple8bControl(expected, 0b1000, 0b0000);
|
appendSimple8bBlock64(expected, kDeltaForBinaryEqualValues);
|
appendEOO(expected);
|
|
verifyDecompression(expected, elems);
|
}
|
where the overload of verifyDecompression is the same as on the v5.0 branch.
|