MCPcopy Create free account
hub / github.com/apache/arrow / CheckBitsEqual

Function CheckBitsEqual

cpp/src/arrow/util/rle_bitmap_test.cc:83–91  ·  view source on GitHub ↗

Check that two bit ranges, stored in `actual` and `expected`, are equal.

Source from the content-addressed store, hash-verified

81
82/// Check that two bit ranges, stored in `actual` and `expected`, are equal.
83void CheckBitsEqual(const CheckBitsEqualParams& params) {
84 ARROW_SCOPED_TRACE("actual_start_bit = ", params.actual_start_bit,
85 ", expected_start_bit = ", params.expected_start_bit);
86 for (rle_size_t i = 0; i < params.count; ++i) {
87 ASSERT_EQ(bit_util::GetBit(params.actual.data(), params.actual_start_bit + i),
88 bit_util::GetBit(params.expected.data(), params.expected_start_bit + i))
89 << "first difference at bit " << i;
90 }
91}
92
93/// Skip the first `expected_skip` values with Advance(), then decode the rest of the run
94/// into one output bitmap, `chunk_size` values at a time. Compare against `expected`.

Callers 1

CheckDecoderClobberFunction · 0.85

Calls 2

GetBitFunction · 0.70
dataMethod · 0.45

Tested by

no test coverage detected