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

Method Reset

cpp/src/arrow/util/rle_encoding_internal.h:288–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286 }
287
288 void Reset(const RunType& run, rle_size_t value_bit_width) noexcept {
289 remaining_count_ = run.values_count();
290 if constexpr (std::is_same_v<value_type, bool>) {
291 // ARROW-18031: just check the LSB of the next byte and move on.
292 // If we memcpy + FromLittleEndian, we have potential undefined behavior
293 // if the bool value isn't 0 or 1.
294 value_ = *run.raw_data_ptr() & 1;
295 } else {
296 value_ = static_cast<value_type>(
297 ::arrow::bit_util::FromLittleEndian(run.value_little_endian()));
298 }
299 }
300
301 /// Return the number of values that can be advanced.
302 rle_size_t remaining() const { return remaining_count_; }

Callers 1

ResetMethod · 0.45

Calls 4

value_little_endianMethod · 0.80
FromLittleEndianFunction · 0.70
values_countMethod · 0.45
raw_data_ptrMethod · 0.45

Tested by

no test coverage detected