niyue commented on code in PR #13041:
URL: https://github.com/apache/arrow/pull/13041#discussion_r862431242


##########
python/pyarrow/includes/libarrow.pxd:
##########
@@ -794,6 +794,10 @@ cdef extern from "arrow/api.h" namespace "arrow" nogil:
         shared_ptr[CRecordBatch] Slice(int64_t offset)
         shared_ptr[CRecordBatch] Slice(int64_t offset, int64_t length)
 
+    cdef cppclass CRecordBatchWithMetadata" arrow::RecordBatchWithMetadata":
+        shared_ptr[CRecordBatch] batch
+        const shared_ptr[const CKeyValueMetadata] custom_metadata

Review Comment:
   In C++, there is no `const` qualifier for this field. However, Cython 
reports some const assignment failure due to this, I read the code, and found 
several similar TODO items about this part:
   
https://github.com/apache/arrow/blob/2a2c0873b3ae62d2d08225cc88e53ae004864a7f/python/pyarrow/includes/libarrow.pxd#L415,
 
https://github.com/apache/arrow/blob/2a2c0873b3ae62d2d08225cc88e53ae004864a7f/python/pyarrow/includes/libarrow.pxd#L462
   
   I am not familiar with Cython at all, and have to add the `const` qualifier 
to make it work at first. Please advise how this could be revised. Thanks.



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