alamb opened a new issue, #8307:
URL: https://github.com/apache/arrow-rs/issues/8307

   **Describe the bug**
   - While working on https://github.com/apache/datafusion/pull/17275
   
   I am trying to show that when we disable the cache by setting the max size 
to zero, the cache doesn't pull get used. To do this I was using the 
[`records_read_from_cache`](https://docs.rs/parquet/latest/parquet/arrow/arrow_reader/metrics/enum.ArrowReaderMetrics.html#method.records_read_from_cache)
 metric
   
   To my surprise, it reported rows being read from the cache even when the 
cache was disabled
   
   I found that the metric reports rows that were read from the "local" cache 
in addition to the actual global cache:
   
   Specifically, in this code:
   
https://github.com/apache/arrow-rs/blob/main/parquet/src/arrow/array_reader/cached_array_reader.rs#L202-L235
   
   <img width="938" height="705" alt="Image" 
src="https://github.com/user-attachments/assets/cbe98746-bdbf-445d-9639-d869532a22d0";
 />
   
   **To Reproduce**
   I set the 
[`max_predicate_cache_size`](https://docs.rs/parquet/latest/parquet/arrow/arrow_reader/struct.ArrowReaderBuilder.html#method.with_max_predicate_cache_size)
 size to zero (disable the cache), and the looked at this metric:
   
   
https://docs.rs/parquet/latest/parquet/arrow/arrow_reader/metrics/enum.ArrowReaderMetrics.html#method.records_read_from_cache
   
   
   **Expected behavior**
   I expect only rows read from the "global cache" (that may consume memory) to 
be included in the metrics
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


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