wjones127 commented on code in PR #37797:
URL: https://github.com/apache/arrow/pull/37797#discussion_r1352833376


##########
python/pyarrow/ipc.pxi:
##########
@@ -815,6 +817,73 @@ cdef class RecordBatchReader(_Weakrefable):
         self.reader = c_reader
         return self
 
+    def __arrow_c_stream__(self, requested_schema=None):
+        """
+        Export to a C ArrowArrayStream PyCapsule.
+
+        Parameters
+        ----------
+        requested_schema: Schema, default None
+            The schema to which the stream should be casted. Currently, this is
+            not supported and will raise a NotImplementedError if the schema 
+            doesn't match the current schema.
+
+        Returns
+        -------
+        PyCapsule
+            A capsule containing a C ArrowArrayStream struct.
+        """
+        cdef:
+            ArrowArrayStream* c_stream
+
+        if requested_schema is not None:
+            out_schema = Schema._import_from_c_capsule(requested_schema)
+            # TODO: figure out a way to check if one schema is castable to

Review Comment:
   Thanks for the pointer. I've created 
https://github.com/apache/arrow/issues/38185



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