Anurag-S1ngh opened a new pull request, #19243:
URL: https://github.com/apache/iceberg/pull/19243

   ## Summary
   
   - `StrictMetricsEvaluator` treated a nested `isNaN` predicate as matching 
every row when the NaN count equaled the value count, even when those counts 
did not cover the whole file.
   - Legacy ORC metrics can report fewer values than records for a field under 
an optional struct. A row whose parent struct is null is not counted as a 
value, but strict evaluation still reported a full match, so a metadata delete 
could remove the entire file.
   - Strict evaluation now requires the field's value count to equal the file 
record count before the NaN count can be treated as covering every row.
   
   ## Changes
   
   - `StrictMetricsEvaluator`: track the file record count and require full 
value coverage in `containsNaNsOnly`.
   - `TestStrictMetricsEvaluator`: add `testIsNaNWithIncompleteNestedCoverage`, 
covering partial coverage (must not match) and complete coverage (must match).
   
   ## Testing
   
   - `./gradlew :iceberg-api:test --tests 
"org.apache.iceberg.expressions.TestStrictMetricsEvaluator"` passes.
   - `./gradlew :iceberg-core:test --tests 
"org.apache.iceberg.TestDeleteFiles"` passes.
   - The new test fails on the unmodified evaluator and passes with the change.
   - `spotlessApply` run for the module.
   
   Closes #19159
   


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