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


##########
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:
   I could inline the `#cfg`, but I remember in the past we were trying to 
steer away from too many cfgs sprinkled about in the code. But maybe for the 
column chunk fields it's a better approach.



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