You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/21 00:14:37 UTC

[GitHub] [arrow] vibhatha commented on a change in pull request #11993: ARROW-15153: [Python] Expose ReferencedBufferSize to python [WIP]

vibhatha commented on a change in pull request #11993:
URL: https://github.com/apache/arrow/pull/11993#discussion_r772744416



##########
File path: python/pyarrow/array.pxi
##########
@@ -994,6 +994,27 @@ cdef class Array(_PandasConvertible):
                 size += buf.size
         return size
 
+    def get_refererenced_buffer_size(self):
+        cdef:
+            shared_ptr[CArray] shd_ptr_c_array
+            CArray *c_array
+            CResult[int64_t] c_res_buffer
+        
+        shd_ptr_c_array = pyarrow_unwrap_array(self)
+        c_array = shd_ptr_c_array.get()
+        c_res_buffer = ReferencedBufferSize(c_array[0])
+        size = GetResultValue(c_res_buffer)
+        return size
+
+    @property
+    def get_buffer_size(self):

Review comment:
       I see. I will update the PR 👍




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org