-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[thrift-remodel] Remove conversion functions for row group and column metadata #8574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
fe9a92f
59051d8
94c2f1a
5b08a0b
ef6b4a4
89984c6
a05f149
12a8c2f
af2a360
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,12 @@ impl<T: HeapSize> HeapSize for Arc<T> { | |
| } | ||
| } | ||
|
|
||
| impl<T: HeapSize> HeapSize for Box<T> { | ||
| fn heap_size(&self) -> usize { | ||
| self.as_ref().heap_size() | ||
| } | ||
| } | ||
|
|
||
| impl<T: HeapSize> HeapSize for Option<T> { | ||
| fn heap_size(&self) -> usize { | ||
| self.as_ref().map(|inner| inner.heap_size()).unwrap_or(0) | ||
|
|
@@ -70,10 +76,17 @@ impl HeapSize for String { | |
|
|
||
| impl HeapSize for FileMetaData { | ||
| fn heap_size(&self) -> usize { | ||
| #[cfg(feature = "encryption")] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, we still need to implement |
||
| let encryption_heap_size = | ||
| self.encryption_algorithm.heap_size() + self.footer_signing_key_metadata.heap_size(); | ||
| #[cfg(not(feature = "encryption"))] | ||
| let encryption_heap_size = 0; | ||
|
|
||
| self.created_by.heap_size() | ||
| + self.key_value_metadata.heap_size() | ||
| + self.schema_descr.heap_size() | ||
| + self.column_orders.heap_size() | ||
| + encryption_heap_size | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -109,6 +122,7 @@ impl HeapSize for ColumnChunkMetaData { | |
| + self.unencoded_byte_array_data_bytes.heap_size() | ||
| + self.repetition_level_histogram.heap_size() | ||
| + self.definition_level_histogram.heap_size() | ||
| + self.geo_statistics.heap_size() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💯 |
||
| + encryption_heap_size | ||
| } | ||
| } | ||
|
|
@@ -141,6 +155,7 @@ impl HeapSize for PageType { | |
| 0 // no heap allocations | ||
| } | ||
| } | ||
|
|
||
| impl HeapSize for Statistics { | ||
| fn heap_size(&self) -> usize { | ||
| match self { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is correct. Should this also include the size of
T?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the description of
arrow-rs/parquet/src/file/metadata/memory.rs
Lines 35 to 39 in fe9a92f
So in that case I do think the size of
Tshould be included. The size ofself(the pointer/Box) should not be included, but the memory it points to should beThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll fix.