alamb commented on code in PR #11125:
URL: https://github.com/apache/arrow-rs/pull/11125#discussion_r4042562819
##########
arrow-array/src/ffi_stream.rs:
##########
@@ -784,4 +847,124 @@ mod tests {
drop(stream); // runs wrapping_release, which chains to the original
assert!(STREAM_WRAPPER_RAN.load(Ordering::SeqCst));
}
+
+ // A producer that exports a stream of plain arrays rather than record
batches.
+ // `FFI_ArrowArrayStream::new` cannot express this, since it takes a
+ // `RecordBatchReader`. See
<https://github.com/apache/arrow-rs/issues/6586>.
Review Comment:
this is a nice way to verify that your usecase continues to work
##########
arrow-array/src/ffi_stream.rs:
##########
@@ -214,6 +250,33 @@ impl FFI_ArrowArrayStream {
}
}
+ /// Returns the producer-provided callback that writes this stream's
schema, if any.
+ ///
+ /// The callback must be invoked with a pointer to the stream it was read
from.
Review Comment:
Maybe this should be a safety note -- given this returns an unsafe function,
I think this doesn't affect the soundness (you can't call the returned callback
without `unsafe`)
--
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]