Test BSON column binary with zero delta after interleave end

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2022-07-25
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Gregory Noma
            Reporter:
            Gregory Noma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: