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

Function RlePreserveBufferSize

cpp/src/parquet/encoder.cc:442–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440static constexpr int32_t kInitialHashTableSize = 1 << 10;
441
442int64_t RlePreserveBufferSize(int64_t num_values, int bit_width) {
443 // Note: because of the way RleEncoder::CheckBufferFull()
444 // is called, we have to reserve an extra "RleEncoder::MinBufferSize"
445 // bytes. These extra bytes won't be used but not reserving them
446 // would cause the encoder to fail.
447 return ::arrow::util::RleBitPackedEncoder::MaxBufferSize(bit_width, num_values) +
448 ::arrow::util::RleBitPackedEncoder::MinBufferSize(bit_width);
449}
450
451/// See the dictionary encoding section of
452/// https://github.com/apache/parquet-format/blob/master/Encodings.md. The encoding

Callers 2

MaxRleBufferSizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected