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


##########
python/pyarrow/tests/test_table.py:
##########
@@ -553,6 +553,34 @@ def test_recordbatch_dunder_init():
         pa.RecordBatch()
 
 
+def test_recordbatch_c_array_interface():
+    class BatchWrapper:
+        def __init__(self, batch):
+            self.batch = batch
+
+        def __arrow_c_array__(self, requested_type=None):
+            return self.batch.__arrow_c_array__(requested_type)
+
+    data = pa.record_batch([
+        pa.array([1, 2, 3])
+    ], names=['a'])

Review Comment:
   Nit: make the type explicit for clarity?
   ```suggestion
       data = pa.record_batch([
           pa.array([1, 2, 3]), type=pa.int64()
       ], names=['a'])
   ```



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