progval commented on PR #12593:
URL: https://github.com/apache/datafusion/pull/12593#issuecomment-2375197430

   I remembered. The issue is that in this code:
   
   
https://github.com/apache/arrow-rs/blob/62825b27e98e6719cb66258535c75c7490ddba44/parquet/src/arrow/async_reader/mod.rs#L212-L228
   
   `ArrowReaderMetadata::load_metadata` does two expensive things:
   
   1. call `AsyncFileReader::get_metadata()` to get a `ParquetMetadata`, which 
we can cache as per `advanced_parquet_index.rs`
   2. instantiate and use 
[`parquet::MetadataLoader`](https://docs.rs/parquet/latest/parquet/arrow/async_reader/struct.MetadataLoader.html)
 to get **another** `ParquetMetadata` from the first one. And this new 
`ParquetMetadata` isn't cachable without my patch.
   
   in essence, it's enriching the `metadata` struct by doing: `let metadata = 
MetadataLoader::new(..., metadata).load_page_index(...).finish()`


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to