alamb commented on code in PR #8445:
URL: https://github.com/apache/arrow-rs/pull/8445#discussion_r2382868981


##########
parquet/src/file/metadata/memory.rs:
##########
@@ -92,6 +92,25 @@ impl HeapSize for RowGroupMetaData {
     }
 }
 
+#[cfg(feature = "encryption")]
+impl HeapSize for ColumnChunkMetaData {
+    fn heap_size(&self) -> usize {
+        // don't count column_descr here because it is already counted in
+        // FileMetaData
+        self.encodings.heap_size()
+            + self.file_path.heap_size()
+            + self.compression.heap_size()
+            + self.statistics.heap_size()
+            + self.encoding_stats.heap_size()
+            + self.unencoded_byte_array_data_bytes.heap_size()
+            + self.repetition_level_histogram.heap_size()
+            + self.definition_level_histogram.heap_size()
+            + self.column_crypto_metadata.heap_size()

Review Comment:
   Yeah, I agree there is no great solution



##########
parquet/src/file/metadata/memory.rs:
##########
@@ -94,6 +94,12 @@ impl HeapSize for RowGroupMetaData {
 
 impl HeapSize for ColumnChunkMetaData {
     fn heap_size(&self) -> usize {
+        #[cfg(feature = "encryption")]

Review Comment:
   I think this is reasonable to me



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