pitrou commented on code in PR #37360:
URL: https://github.com/apache/arrow/pull/37360#discussion_r1309993848


##########
cpp/src/arrow/compute/function_internal.cc:
##########
@@ -83,8 +83,10 @@ Result<std::unique_ptr<FunctionOptions>> 
GenericOptionsType::Deserialize(
 
 Result<std::unique_ptr<FunctionOptions>> DeserializeFunctionOptions(
     const Buffer& buffer) {
-  io::BufferReader stream(buffer);
-  ARROW_ASSIGN_OR_RAISE(auto reader, 
ipc::RecordBatchFileReader::Open(&stream));
+  // Copying the buffer here is not ideal, but we need to do it to avoid
+  // lifetime issues with the zero-copy buffer read.

Review Comment:
   Hmm, ok. We can revisit later if needed.



-- 
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