Skip to content

Commit 90eaaad

Browse files
committed
Extra doc
1 parent bd9b8f5 commit 90eaaad

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cpp/src/arrow/util/rle_bitmap_internal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
namespace arrow::util {
2929

30+
/// A lightweight view over a bitmap.
3031
template <typename B = uint8_t>
3132
class BitmapSpan {
3233
public:
@@ -38,10 +39,13 @@ class BitmapSpan {
3839
Normalize();
3940
}
4041

42+
/// Pointer to the byte where the first value is stored.
4143
constexpr byte_type* data() const noexcept { return data_; }
4244

45+
/// Bit offset of the first value in the first byte.
4346
constexpr size_type bit_start() const noexcept { return bit_start_; }
4447

48+
/// Return a new span starting at the given position.
4549
constexpr BitmapSpan NewStartingAt(size_type bit_start) const noexcept {
4650
auto out = *this;
4751
out.bit_start_ += bit_start;
@@ -217,10 +221,6 @@ class BitPackedRunToBitMapDecoder
217221
data_ = run.raw_data_ptr();
218222
values_count_ = run.values_count();
219223
values_read_ = 0;
220-
// This decoder bounds all of its reads by `values_count_` alone and does not
221-
// carry `max_read_bytes`. Its memory safety therefore relies on the producer
222-
// having sized the run to fit the backing buffer. Check that contract here,
223-
// at the point it is relied upon (a negative max means "unbounded").
224224
ARROW_DCHECK(run.raw_data_max_size() < 0 ||
225225
bit_util::BytesForBits(values_count_) <= run.raw_data_max_size());
226226
}

0 commit comments

Comments
 (0)