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


##########
parquet/src/file/metadata/mod.rs:
##########
@@ -507,19 +229,56 @@ impl ParquetMetaData {
         #[cfg(not(feature = "encryption"))]
         let encryption_size = 0usize;
 
+        // We can only determine the heap size for PageIndex. Custom providers 
are
+        // out of scope.
+        let page_index_size = if let Some(page_index) = 
self.page_index.as_ref() {
+            if let Some(page_index) = 
page_index.as_any().downcast_ref::<PageIndex>() {
+                let page_index = Some(Arc::new(page_index.clone()));

Review Comment:
   Yeah, I knew this was janky. I'm working through the correct thing to do 
here. I think this form was undercounting when the page index was `Some` anyway.
   
   I want to push `heap_size` into the provider API now because I think adding 
a function to a public trait constitutes a breaking change. I'll see if I can 
get this right today.



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