jorgecarleitao commented on a change in pull request #8561:
URL: https://github.com/apache/arrow/pull/8561#discussion_r517120190



##########
File path: rust/arrow/src/array/array.rs
##########
@@ -2398,30 +2311,23 @@ impl<T: ArrowPrimitiveType> Array for 
DictionaryArray<T> {
 
     /// Returns the total number of bytes of memory occupied by the buffers 
owned by this [DictionaryArray].
     fn get_buffer_memory_size(&self) -> usize {
-        self.data.get_buffer_memory_size() + 
self.values().get_buffer_memory_size()
+        // Since both `keys` and `values` derive (are references from) `data`, 
we only account for `data`.
+        self.data.get_array_memory_size()

Review comment:
       @vertexclique , I modified this code. Do you think it is correct now?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to