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 2020/11/04 04:53:58 UTC
[GitHub] [arrow] jorgecarleitao commented on a change in pull request #8561: ARROW-10449 [Rust] Make Dictionary::keys be an array
jorgecarleitao commented on a change in pull request #8561:
URL: https://github.com/apache/arrow/pull/8561#discussion_r517096801
##########
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:
I think that @vertexclique 's point is that we should still use `buffer` from `keys` and `values` here, and in the `array_size`, use `size_of` itself. I think it is a small amount of memory difference, but to keep things consistent, I should change it.
----------------------------------------------------------------
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:
users@infra.apache.org