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

Method EnsureDecodeBuffer

cpp/src/parquet/decoder.cc:2320–2327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2318 }
2319
2320 uint8_t* EnsureDecodeBuffer(int64_t min_values) {
2321 const int64_t size = this->type_length_ * min_values;
2322 if (!decode_buffer_ || decode_buffer_->size() < size) {
2323 const auto alloc_size = ::arrow::bit_util::NextPower2(size);
2324 PARQUET_ASSIGN_OR_THROW(decode_buffer_, ::arrow::AllocateBuffer(alloc_size));
2325 }
2326 return decode_buffer_->mutable_data();
2327 }
2328
2329 int stride_{0};
2330 std::shared_ptr<Buffer> decode_buffer_;

Callers 1

DecodeMethod · 0.80

Calls 4

NextPower2Function · 0.85
AllocateBufferFunction · 0.70
sizeMethod · 0.45
mutable_dataMethod · 0.45

Tested by

no test coverage detected