mapleFU commented on code in PR #48309:
URL: https://github.com/apache/arrow/pull/48309#discussion_r2583512443
##########
cpp/src/parquet/decoder.cc:
##########
@@ -147,6 +139,20 @@ struct ArrowBinaryHelper<ByteArrayType,
::arrow::BinaryType> {
return Status::OK();
}
+ Status ReserveInitialChunkData(std::optional<int64_t>
estimated_remaining_data_length) {
+ RETURN_NOT_OK(builder_->Reserve(entries_remaining_));
+ if (estimated_remaining_data_length.has_value()) {
+ int64_t required_capacity =
+ std::min(*estimated_remaining_data_length, chunk_space_remaining_);
+ // Ensure we'll be allocating a non-zero-sized data buffer, to avoid
encountering
+ // a null pointer
+ constexpr int64_t kMinReserveCapacity = 64;
Review Comment:
https://github.com/apache/arrow/blob/322516f3940120cb2eddf3b1f919b38f0c81b097/cpp/src/arrow/memory_pool_internal.h#L35
Maybe here rather than a null pointer?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]