paleolimbot commented on code in PR #40807:
URL: https://github.com/apache/arrow/pull/40807#discussion_r1541356282


##########
cpp/src/arrow/c/bridge.h:
##########
@@ -321,6 +321,37 @@ ARROW_EXPORT
 Status ExportChunkedArray(std::shared_ptr<ChunkedArray> chunked_array,
                           struct ArrowArrayStream* out);
 
+/// \brief Export C++ RecordBatchReader using the C device stream interface
+///
+/// The resulting ArrowDeviceArrayStream struct keeps the record batch reader
+/// alive until its release callback is called by the consumer. The device
+/// type is determined by calling device_type() on the RecordBatchReader.
+///
+/// \note it is assumed that the output pointer has already be zeroed out 
before
+/// calling this function.

Review Comment:
   > I added this note because I noticed that the other export methods also did 
not, themselves, do a memset and expected that the output pointer has already 
been zeroed out.
   
   It would be safer to fix that on Arrow C++'s side (and zero out the memory 
if that is indeed an assumption it needs to make). Requiring the consumer to 
zero out the struct (or even set the release callback to null) would be a 
breaking change and I am not sure that is what you want to do in this PR (even 
if it is a good idea).



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