[SERVER-67854] Test BSON column binary with zero delta after interleave end Created: 07/Jul/22  Updated: 29/Oct/23  Resolved: 12/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Gregory Noma Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-67855 BSON column with non-zero delta after... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-07-25
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 12/Jul/22 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-67854 Test BSON column binary with zero delta after interleaved
Branch: master
https://github.com/mongodb/mongo/commit/2c1261e53041f34cecc2cf8b2dbfdbda3821561f

Generated at Thu Feb 08 06:09:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.