sshpuntoff opened a new pull request, #7856:
URL: https://github.com/apache/datafusion-comet/pull/7856

   ## Which issue does this PR close?
   
   Closes #7855.
   
   ## Rationale for this change
   
   Two scans in one native plan share a cached Parquet footer when their files 
have the same path and size in different object stores. The second scan then 
prunes with the first file's statistics and silently drops rows. The issue has 
an example.
   
   The root cause is apache/datafusion#27579: the cache key is the path inside 
the store, without the store.
   
   ## What changes are included in this PR?
   
   - `store_metadata_cache(runtime_env, object_store_url)` returns a view of 
the shared `FileMetadataCache` that puts the object store URL in every key.
   - The Parquet scan and the deletion-vector prefetch of a Delta scan use this 
view instead of the shared cache.
   - The memory limit and eviction are unchanged, because the entries still 
live in the one shared cache.
   
   This can be removed once Comet moves to a DataFusion release that includes 
apache/datafusion#27580.
   
   ## How are these changes tested?
   
   - `same_path_and_size_in_two_stores_do_not_share_cached_metadata`: two 
in-memory stores, same path, same size, different contents, with a filter. 
Without the fix the second scan returns 0 rows from 1 cache hit and 0 footer 
reads.
   - `stores_do_not_share_the_entry_of_a_path`: unit test of the view.
   - `cargo test -p datafusion-comet --lib` passes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to