kou commented on code in PR #39081:
URL: https://github.com/apache/arrow/pull/39081#discussion_r1448024426


##########
http/examples/get/client.cpp:
##########


Review Comment:
   Note that the first example will crash when we touch collected record 
batches. Because the decoded record batches are only valid in  
`Listener::OnRecordBatchWithMetadataDecoded()` callback.
   If we want to use decoded record batches after `curl_easy_performe()`, we 
need to copy the decoded record batches in 
`Listener::OnRecordBatchWithMetadataDecoded()`. We have an implementation for 
it 
https://github.com/apache/arrow/pull/39164/files#diff-900c46995b5706697d6e4b010f610f1a1cf27d4d865afe48de0a800830ac676bR1333
 but it's included only in our test code. Because I couldn't find a good API in 
#39164...
   
   FYI: My recommendation is that processing each decoded record batch in 
`Listener::OnRecordBatchWithMetadataDecoded()` callback instead of copying it.
   



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