HuaHuaY commented on code in PR #48309:
URL: https://github.com/apache/arrow/pull/48309#discussion_r2583488156


##########
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:
   What is the null pointer here and what will happen if there is 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]

Reply via email to