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

Method Reset

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

Source from the content-addressed store, hash-verified

274 }
275
276 void Reset(const RunType& run, rle_size_t value_bit_width) noexcept {
277 remaining_count_ = run.values_count();
278 if constexpr (std::is_same_v<value_type, bool>) {
279 // ARROW-18031: just check the LSB of the next byte and move on.
280 // If we memcpy + FromLittleEndian, we have potential undefined behavior
281 // if the bool value isn't 0 or 1.
282 value_ = *run.raw_data_ptr() & 1;
283 } else {
284 value_ = static_cast<value_type>(
285 ::arrow::bit_util::FromLittleEndian(run.value_little_endian()));
286 }
287 }
288
289 /// Return the number of values that can be advanced.
290 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