unikdahal opened a new pull request, #3347:
URL: https://github.com/apache/iceberg-rust/pull/3347

   ## Which issue does this PR close?
   
   - Closes #3346.
   - Part of #3343.
   
   ## What changes are included in this PR?
   
   `InclusiveMetricsEvaluator` only reads a data file's record count and its 
value, null and NaN counts and lower/upper bounds, but it requires a whole 
`DataFile`.
   
   - Add a crate-internal `FileMetrics<'a>` view that borrows those statistics, 
with `From<&DataFile>`.
   - Add `InclusiveMetricsEvaluator::eval_metrics(filter, FileMetrics, 
include_empty_files)`; `eval(filter, &DataFile, include_empty_files)` now 
converts and delegates.
   - A record count known to be zero still excludes the file unless 
`include_empty_files` is set. An unknown record count does not by itself 
exclude the file; the available bounds and counts may still prune it.
   
   No behaviour change for existing callers and no public API change 
(everything new is `pub(crate)`). This lets follow-up work evaluate whole-file 
statistics carried with a scan task without reconstructing a `DataFile`.
   
   ## Are these changes tested?
   
   Yes:
   
   - Existing inclusive metrics evaluator tests pass unchanged through the 
delegating `eval`.
   - New: `FileMetrics` built from independently constructed maps (no 
`DataFile`) prunes and keeps files from bounds and null counts with both a 
known and an unknown record count, keeps files whose column has no statistics, 
and skips a known empty file unless empty files are included.
   
   ## AI Disclosure
   
   This change was developed with assistance from Claude Code and reviewed by 
me. Tests and CI results come from this branch.
   


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