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

Method FlushRepeatedRun

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

Source from the content-addressed store, hash-verified

1404}
1405
1406inline void RleBitPackedEncoder::FlushRepeatedRun() {
1407 ARROW_DCHECK_GT(repeat_count_, 0);
1408 bool result = true;
1409 // The lsb of 0 indicates this is a repeated run
1410 int32_t indicator_value = repeat_count_ << 1 | 0;
1411 result &= bit_writer_.PutVlqInt(static_cast<uint32_t>(indicator_value));
1412 result &= bit_writer_.PutAligned(
1413 current_value_, static_cast<int>(::arrow::bit_util::CeilDiv(bit_width_, 8)));
1414 ARROW_DCHECK(result);
1415 num_buffered_values_ = 0;
1416 repeat_count_ = 0;
1417 CheckBufferFull();
1418}
1419
1420/// Flush the values that have been buffered. At this point we decide whether
1421/// we need to switch between the run types or continue the current one.

Callers

nothing calls this directly

Calls 3

CeilDivFunction · 0.85
PutVlqIntMethod · 0.80
PutAlignedMethod · 0.80

Tested by

no test coverage detected